Visual RFC.
ALL RFCs / RFC 9700
Read the RFC ↗
RFC 9700 / ATTACKS & DEFENSES

PKCE downgrade

16

A server that silently accepts an unbound code can undo a client’s reliance on PKCE for CSRF protection.

RFC 9700 · § 4.8DEFENSE
3 / 3
03
Reject this inconsistent exchange.

A verifier must not be accepted for a code that had no challenge.

PKCE downgradeA server that silently accepts an unbound code can undo a client’s reliance on PKCE for CSRF protection. Current state: Reject this inconsistent exchange..PKCE downgradeCode A: no challenge was recordedApp · BToken endpointcode A + verifier BUnexpected verifier → reject; no token

Key idea: A verifier requires a recorded challenge.

Terms

Look up a term in the glossary ↗

Rules & examples
  • Servers MUST bind the presence of the challenge to the issued code.
  • If a challenge was supplied, enforce a correct verifier.
  • If no challenge was supplied, a token request containing a verifier MUST be rejected. Mandating PKCE also enforces this protection.

The attacker removes a challenge in their own flow and injects the resulting unbound code into a victim’s flow. This does not require breaking TLS or editing the victim’s network traffic.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
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.

What changed
RFC 6749 § 4.1RFC 9700 § 4.8.2

PKCE downgrade protection is explicit: a verifier must be rejected if the original authorization request contained no challenge.

Read the updated RFC section ↗

All chapters in RFC 9700

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗