Site A: test-website-a.pages.dev
A page served with Content-Security-Policy: sandbox (no
allow-* flags) is forbidden from navigating the top-level frame.
A <meta http-equiv="refresh"> on such a page is refused.
Brave's De-AMP feature sniffs every text/html response for AMP
markup plus a <link rel="canonical"> and redirects the top
frame to that canonical URL. It does not inspect the response's CSP header, so
a sandboxed page still gets navigated to its (attacker-controlled) canonical
URL, bypassing the sandbox restriction.
brave://settings/privacy → "Auto-redirect AMP
pages" (on by default)./de-amp/csp-sandbox/landed.html. That is the
bug.1. Sandboxed AMP page (CSP: sandbox) -- De-AMP should NOT redirect, but does
2. Sandboxed meta-refresh (control) -- sandbox correctly blocks navigation
3. AMP page, no CSP (control) -- ordinary, expected De-AMP redirect
| Link | Protected browser | Vulnerable (current Brave) |
|---|---|---|
| 1. Sandboxed AMP page | Stays on page | Redirected to landed.html |
| 2. Sandboxed meta-refresh | Stays on page (refused) | Stays on page (refused) |
| 3. AMP page, no CSP | Redirected (expected) | Redirected (expected) |