| Titolo | mf-yang openclaw-cn 0.2.1 Exposure of Sensitive Information to an Unauthorized Actor (CWE-200) |
|---|
| Descrizione | # Technical Details
A `file://` Local File Disclosure via Navigation Guard Bypass exists in the `assertBrowserNavigationAllowed()` function in `src/browser/navigation-guard.ts` of openclaw-cn.
The application fails to block unsupported URL schemes in the browser navigation guard. The guard only validates `http:` and `https:` targets using a protocol allowlist (`NETWORK_NAVIGATION_PROTOCOLS`), and returns early without rejection for every other scheme including `file:`. An authenticated browser-control caller can `POST /tabs/open` with a `file://` URL, bypass the guard, and reach the CDP `Target.createTarget` sink. The rendered local file content can then be read back through `GET /snapshot`.
# Vulnerable Code
File: src/browser/navigation-guard.ts
Method: assertBrowserNavigationAllowed() — checks if protocol is in NETWORK_NAVIGATION_PROTOCOLS, returns early (no rejection) for other schemes
File: src/browser/cdp.ts
Method: createTargetViaCdp() — issues CDP Target.createTarget with the original attacker-controlled URL
Why: The guard treats non-http/https schemes as "not needing validation" rather than "should be blocked," allowing file:// to pass through to the CDP navigation sink.
# Reproduction
1. Start the browser-control server with token auth.
2. Create a local canary HTML file on the host.
3. `POST /tabs/open` with `{"url":"file:///tmp/canary.html"}` — receive valid targetId.
4. `GET /snapshot?targetId=...` — read the canary text from the snapshot JSON.
5. Confirm the control case using `about:blank` does not expose the canary.
# Impact
- Authenticated browser-control caller can cause Chrome to render local files and recover content via snapshot readback.
- Exposes local HTML reports, temporary files, debugging artifacts, and other browser-readable host-local content.
- Breaks the intended navigation safety boundary through a documented HTTP API. |
|---|
| Fonte | ⚠️ https://github.com/mf-yang/openclaw-cn/issues/561 |
|---|
| Utente | JohnChen (UID 99088) |
|---|
| Sottomissione | 18/06/2026 08:56 (2 mesi fa) |
|---|
| Moderazione | 05/08/2026 20:52 (2 months later) |
|---|
| Stato | Duplicato |
|---|
| Voce VulDB | 383319 [mf-yang openclaw-cn fino a 0.2.1 Scheme navigation-guard.ts assertBrowserNavigationAllowed url rivelazione di informazioni] |
|---|
| Punti | 0 |
|---|