Cross-site request forgery
15An attacker sends an unsolicited callback to a victim’s browser, causing the client to connect to resources chosen by the attacker.
Validate the binding and consume one-time values.
Key idea: Bind the response to the initiating browser.
Rules & examples
Bind the response to the initiating browser.
- Clients MUST prevent CSRF. Use a one-time, session-bound state token unless PKCE or OIDC nonce provides the protection.
- Before relying on PKCE for CSRF, clients MUST ensure server support. Without that support, use state or nonce.
- If application state integrity matters, protect state from tampering and swapping.
PKCE protects against CSRF even with an attacker who reads authorization responses. Leaked state can be replayed; nonce exposed in a front-channel ID Token has related limits.
Sources
New to this? Start hereA quick picture + helpful background
A key is different from permission.
An app, a person, and a server have different roles. Follow who asks, who grants permission, and who checks the credential. A key in the drawing is an analogy, not a literal protocol field.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.