Files
Pulse/docs/release-control
rcourtman 33f671252f Refuse cross-site writes on proxy-attached API tokens
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.
2026-11-05 23:56:59 +00:00
..