Host filesystem path disclosure via DNS rebinding
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| tidewave-aitidewave |
≥ f78352b56d19cd4ae49999aa385011cef73e8b93, < 80159536f752dc4d34797934d1516f29cea12b50→ 80159536f752dc4d34797934d1516f29cea12b50 |
80159536f752dc4d34797934d1516f29cea12b50 |
| Hextidewave |
≥ 0.8.0, < 0.9.2→ 0.9.2 |
0.9.2 |
Original description The description as published by the source.
Summary
An attacker can read the name of filesystem paths of your application present via Tidewave configuration via /tidewave/connect or via the rendered toolbar.
Neither response checks the Host header. A web page that rebinds its own domain to the loopback address can therefore read the tag with a same-origin request, which carries no Origin header. The paths usually reveal the local username and the project layout.
This issue affects tidewave: from 0.8.0 before 0.9.2.
Details
1. Data collection. Tidewave.tidewave_config_meta/1 builds a map with root (Tidewave.MCP.root()), framework.app_paths (Mix.Project.deps_paths()), wsl_distro, and host_path. It HTML-escapes the JSON encoding of the map into ``.
2. Exposure. Tidewave.Router.control_html/1 serves the tag on GET /tidewave/connect. For all other routes, Tidewave.call/2 registers a before_send callback that injects the tag into every text/html response when toolbar: true.
3. Read access. check_origin/2 accepts any request without an Origin header, and no code validates Host. After DNS rebinding, the browser sends a same-origin GET from a loopback peer.
Proof of concept
- Run a Phoenix or Plug application with
plug Tidewaveon127.0.0.1:4001. - From a loopback peer, send
GET /tidewave/connectwithHost: attacker.example:4001andSec-Fetch-Site: same-origin, and noOriginheader. This is the request a DNS-rebound page makes. - The server answe…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory nvd.nist.gov
- advisory github.com
- package hex.pm
- package github.com
- patch github.com
- web cna.erlef.org
- web osv.dev
- web github.com
- web github.com
- web github.com
- web repo.hex.pm