fix(browser): block Camofox private redirects before auto-snapshot - #57394
fix(browser): block Camofox private redirects before auto-snapshot#57394necoweb3 wants to merge 2 commits into
Conversation
Related: completes the browser SSRF cluster by covering the Camofox sink. Sibling merged fixes: #54132 (snapshot/vision/eval), #54435 (get_images), #56173 (interaction sinks), #56373 (console output), #56526 (browser_back). Distinct navigation sink/mechanism, so this is complementary — not a duplicate. Cluster floor P1 (exploitable SSRF on a non-local Camofox backend, clear vector). |
|
suggesting changes Security evidence:
Please carry the backend-returned created-tab URL through the stale-tab recovery path as well, and add a regression test where a stale tab 404 is followed by a recreated tab landing on metadata/private URL before any snapshot is attempted. Signed: GPT-5.5-xhigh in Codex |
Updated, thanks for catching the stale-tab recovery gap. The branch now carries the backend-returned recreated-tab URL through the 404 recovery path (
Validation: |
|
Thanks for covering the remaining Camofox navigation sink. Current The proposed final-URL guard follows the established non-Camofox redirect behavior in Automated hermes-sweeper review. |
Summary
This adds post-navigation redirect checks to the Camofox browser backend before
camofox_navigate()returns a result or takes its automatic compact snapshot.Why
The main
browser_navigate()path already blocks redirects that land on cloud metadata or private/internal addresses before returning page state. The Camofox path delegated tocamofox_navigate()after the initial URL safety checks, butcamofox_navigate()did not re-check the final URL returned by the Camofox backend.That left a sibling path where a public URL could redirect Camofox to an internal/private page and
camofox_navigate()would proceed to take its auto-snapshot. On a non-local Camofox backend, this can expose private network content the terminal itself cannot reach.There was also a first-tab edge case:
_ensure_tab()received the backend's created-tab URL but discarded it, so first navigations could not inspect the final URL before the auto-snapshot.Changes
_ensure_tab().about:blankafter a blocked redirect.Tests