mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-12-03 18:43:38 +01:00
A proxy that adds X-API-Token or a Bearer token to every request also adds it to a form or no-cors fetch from another site's page. No session cookie arrives, so CheckCSRF skips the request and the page spends the token's scopes. On a real server such a page created API tokens and added its own origin to allowed origins, then read the token list. A page cannot send its own token without a CORS grant, because the browser stops it at preflight, so requiring a grant refuses no such page. Any grant admits the write, including *, where a page may legitimately send a token and Pulse cannot tell that apart from one a proxy attached. Clients sending no browser metadata are unaffected. A forwarder that rewrites Host and passes on the browser's Origin now gets 403, and listing the page's origin admits it.