An old token endpoint still redeems authorization codes with no PKCE check and no sender binding. Intercept a code and it is yours to spend.
What goes wrong
PKCE exists so that an authorization code, on its own, is useless. The client proves it started the flow by presenting a secret that matches the challenge it sent earlier. Strip that check and the code becomes a bearer secret again, which is exactly what PKCE was meant to end.
This endpoint routes to an older code path that passes a null proof and never asks for the verifier. Any code that reaches it is redeemed on presentation alone. Authorization codes leak more often than people expect: a logged redirect here, a malicious app registered for the same URI there. On a mobile or single-page client with no client secret, the code is often the only thing between an attacker and a token.
The pattern
function handleToken(form) {
const req = toTokenRequest(form)
req.proof = null // no sender binding
// legacy path never compares a verifier to the stored challenge
return exchange(req, { path: "legacy" })
}function handleToken(form) {
const req = toTokenRequest(form)
if (!form.code_verifier) throw new Error("PKCE required")
verifyChallenge(form.code_verifier, storedChallengeFor(form.code))
req.proof = requireProofOfPossession(form) // sender-constrained
return exchange(req) // one current path
}Grounding and reachability were confirmed. The exploit-path gate would not conclude without the calling code, so the finding was held and an evidence request was raised instead of being reported as fact.
Why it matters to you
Interception attacks on authorization codes are not theoretical, and public clients are the ones that get hit. If any live client can still be pointed at this endpoint, your PKCE enforcement is optional, which means it is not enforcement.
Retire the legacy path, or hold it to the same proof the current one demands. There is rarely a good reason to keep a second, weaker way to do the most sensitive exchange in the whole protocol.
Check your own code
- Confirm every token endpoint rejects a code exchange that arrives without a valid PKCE verifier.
- Search for code paths that set the proof or verifier to null before exchange.
- Retire duplicate token endpoints, or hold them to identical checks.
- Add a test that replays a code with no verifier and expects a hard failure.