Briefing · Article · source · published · Boston Identity
RFC 9700 bans OAuth's password grant and loose redirect matching; binding access tokens stays a SHOULD
Torsten Lodderstedt, John Bradley, Andrey Labunets and Daniel Fett wrote RFC 9700, the OAuth working group's security advice for OAuth 2.0, published in 2025 as Best Current Practice 240. It sets hard rules for authorization servers and public clients, from exact redirect URI matching to PKCE, and admits that following it may break interoperability. It does not mention AI agents.
IETF (RFC Editor) · Torsten Lodderstedt, John Bradley, Andrey Labunets, Daniel Fett · Jan 2025 · read
What's happening
Finding4RFC 9700 requires exact redirect URI matching, PKCE support on servers and PKCE for public clients, and says the password grant must not be used.
Several of RFC 9700's MUSTs are checks an IAM team can run against its own stack. Authorization servers must match redirect URIs by exact string, with only the port of a native app's localhost URI exempt. They must support PKCE (Proof Key for Code Exchange) and refuse a token request that carries a code_verifier when the authorization request had no code_challenge. Public clients must use PKCE, and their refresh tokens must be sender-constrained or rotated. The resource owner password credentials grant must not be used. Two neighbouring rules are softer: the implicit grant gets a SHOULD NOT with an exception, and PKCE for confidential clients is only RECOMMENDED. The authors concede that following the document "may break interoperability" and still recommend upgrading "as soon as feasible".
flag a problem with BI-FIND-2025-0351
For access tokens the RFC stops at SHOULD: servers should tie each token to a key the client holds and limit it to one or a few resource servers.
For access tokens the RFC stops at SHOULD. Authorization and resource servers should sender-constrain them, tying each token to a key the client holds with a mechanism such as mutual TLS (RFC 8705) or DPoP (RFC 9449), and should restrict each token to one resource server or a small set. The threat is an attacker who gets hold of a token, for example by running a counterfeit resource server or compromising a real one. The authors concede that "architecture and performance reasons" may rule these measures out in some deployments, and that a bound token is undermined once the attacker also has the key. They also decline to rely on clients to spot a counterfeit resource server, because many clients fail to implement checks such as state: relying on them "is likely to fail as well".
flag a problem with BI-FIND-2025-0352
The RFC requires a client that works with more than one authorization server to defend against mix-up attacks, in which one of those servers is the attacker's.
A client that can work with more than one authorization server is REQUIRED to defend against mix-up attacks. The attack assumes one of those servers is under the attacker's control, which the RFC says can happen, for example, when the attacker registers the client at their own server through dynamic registration, or when a server is compromised. In its walk-through the user picks the attacker's server, the attacker forwards the request to the honest server under the client's ID there, and the client, still believing the attacker's server answered, redeems the honest server's code at the attacker's token endpoint. Clients should check the iss parameter (RFC 9207) or an issuer value such as the ID Token's iss claim. Distinct redirect URIs per server also work, but the RFC says that defence "SHOULD therefore only be used if other options are not available".
flag a problem with BI-FIND-2025-0353
Figure steps
- The user picks the attacker's server at a client that uses one redirect URI for both servers.
- The client remembers that choice in the user's session and sends the user to the attacker's authorization endpoint.
- The attacker forwards the browser to the honest server, swapping in the client's ID there.
- The user approves at the honest server, which sends a code back to the client through the browser.
- The client still assumes the attacker's server issued the code and redeems it at the attacker's token endpoint.
- The attacker now holds the honest server's code and can exchange it for a token or use it in a code injection attack.
Because the client remembers only which server the user picked, it redeems the honest server's code at the attacker's token endpoint; the iss parameter names the server that actually answered.
Sequence as RFC 9700 section 4.4.1 describes itSource dated Jan 2025Passage: Sections 4.1 to 4.8
Swipe for the full figure →
A malicious client that picks a user's identifier as its client_id may reach that user's resources if the resource server cannot tell the tokens apart.
Section 4.15 warns that a resource server can mistake a client for a user. Under the JWT access token profile (RFC 9068), sub should name the resource owner when a user is involved, and the client application under grants with no user, such as client credentials. So if a client can choose its own client_id at registration, a malicious client may pick a user's identifier and, if the resource server cannot tell the two kinds of token apart, reach that user's resources. Where client IDs and user identifiers share a namespace, authorization servers should not let clients influence their client_id or any claim that could be confused with a real user's. Where that cannot be avoided, they must give resource servers some other way to distinguish the two.
flag a problem with BI-FIND-2025-0354
Section by section
6showing 6 of 6
[1]Why a security BCP: scope, status and what it deprecates
Torsten Lodderstedt, SPRIND · John Bradley, Yubico · Andrey Labunets, Independent Researcher · Daniel Fett, Authlete
Standards
Why a security BCP: scope, status and what it deprecates
Torsten Lodderstedt, SPRIND · John Bradley, Yubico · Andrey Labunets, Independent Researcher · Daniel Fett, Authlete
RFC 9700 (BCP 240) updates and extends RFC 6749, 6750 and 6819. The authors' reasons: attackers keep exploiting known weaknesses, OAuth now serves high-assurance uses such as open banking and eHealth, clients and servers increasingly find each other dynamically, and browsers have changed how they treat URL fragments on redirects. It deprecates some modes, concedes that compliance may break interoperability, and says OAuth 2.1 will incorporate its advice. It reports no deployment data.
technical artifactfrom published text
[2]Section 2: the core requirements
Torsten Lodderstedt, SPRIND · John Bradley, Yubico · Andrey Labunets, Independent Researcher · Daniel Fett, Authlete
Standards
Section 2: the core requirements
Torsten Lodderstedt, SPRIND · John Bradley, Yubico · Andrey Labunets, Independent Researcher · Daniel Fett, Authlete
Section 2 is the normative summary. Its MUSTs cover exact redirect URI matching, no open redirectors, CSRF protection, PKCE (servers support it, public clients use it), sender-constrained or rotated refresh tokens for public clients, and no password grant. Clients should avoid the implicit grant, and access tokens should be sender-constrained, audience-restricted and held to minimum privilege. Asymmetric client authentication and authorization server metadata are RECOMMENDED.
technical artifactfrom published text
[3]Section 3: the updated attacker model (A1 to A5)
Torsten Lodderstedt, SPRIND · John Bradley, Yubico · Andrey Labunets, Independent Researcher · Daniel Fett, Authlete
Standards
Section 3: the updated attacker model (A1 to A5)
Torsten Lodderstedt, SPRIND · John Bradley, Yubico · Andrey Labunets, Independent Researcher · Daniel Fett, Authlete
Section 3 makes RFC 6819's implicit attacker model explicit. A1 (web attacker) and A2 (network attacker) are the minimal model used in formal analyses of OAuth; A3 reads the authorization response, A4 reads the request, A5 holds an access token, for example from a compromised resource server. A3 to A5 typically occur with A1 or A2, and implementers must consider all attacker types.
technical artifactfrom published text
[4]Sections 4.1 to 4.8: redirect, leakage, mix-up, injection, CSRF and PKCE downgrade
Torsten Lodderstedt, SPRIND · John Bradley, Yubico · Andrey Labunets, Independent Researcher · Daniel Fett, Authlete
Standards
Sections 4.1 to 4.8: redirect, leakage, mix-up, injection, CSRF and PKCE downgrade
Torsten Lodderstedt, SPRIND · John Bradley, Yubico · Andrey Labunets, Independent Researcher · Daniel Fett, Authlete
Sections 4.1 to 4.8 walk through eight attacks step by step with their fixes: flawed redirect URI pattern matching, leakage through Referer headers and browser history, mix-up between authorization servers, code and token injection, CSRF, and PKCE downgrade. For the downgrade, the server must refuse a code_verifier when no code_challenge was sent, because many clients do not check state properly. The evidence is cited research and attacks seen in the wild.
technical artifactfrom published text
[5]Sections 4.9 and 4.10: leaked and stolen access tokens
Torsten Lodderstedt, SPRIND · John Bradley, Yubico · Andrey Labunets, Independent Researcher · Daniel Fett, Authlete
Standards
Sections 4.9 and 4.10: leaked and stolen access tokens
Torsten Lodderstedt, SPRIND · John Bradley, Yubico · Andrey Labunets, Independent Researcher · Daniel Fett, Authlete
Sections 4.9 and 4.10 deal with access tokens phished by a counterfeit resource server or taken from a compromised real one. Sender-constrained tokens, via mechanisms such as mutual TLS (RFC 8705) or DPoP (RFC 9449), and audience restriction SHOULD be used. The authors concede that architecture and performance may rule this out, and that a stolen key undermines a bound token. They will not rely on clients to vet resource servers, since many clients fail at controls such as state checks.
technical artifactfrom published text
[6]Sections 4.11 to 4.17: open redirectors, 307, proxies, refresh tokens, client impersonation, clickjacking, postMessage
Torsten Lodderstedt, SPRIND · John Bradley, Yubico · Andrey Labunets, Independent Researcher · Daniel Fett, Authlete
Standards
Sections 4.11 to 4.17: open redirectors, 307, proxies, refresh tokens, client impersonation, clickjacking, postMessage
Torsten Lodderstedt, SPRIND · John Bradley, Yubico · Andrey Labunets, Independent Researcher · Daniel Fett, Authlete
Clients and authorization servers must not act as open redirectors, and dynamic registration gives attackers one way to abuse a server as one. Servers must not use HTTP 307 for redirects that may carry credentials; reverse proxies must sanitize security headers. Refresh tokens must stay bound to the consented scope, with replay detection required for public clients. Sections 4.15 to 4.17 cover client_id and sub confusion, clickjacking defences such as CSP, and exact origins for postMessage.
technical artifactfrom published text