Skip to Content
CryptographyCryptography
  • Article
  • Open Access

30 November 2026

23 Pages

Formal Verification of Authorization Code Replay Prevention and Session Binding in OAuth 2.0 with PKCE Using ProVerif

,
,
and
1
Graduate School of Bionics, Computer and Media Sciences, Tokyo University of Technology, Tokyo 192-0982, Japan
2
School of Computer Science, Tokyo University of Technology, Tokyo 192-0982, Japan
3
Graduate School of Science and Technology, Shinshu University, Matsumoto 390-8621, Japan
4
Department of Business, EPSON AVASYS Corporation, Nagano 386-1211, Japan

Abstract

OAuth 2.0 with the Proof Key for Code Exchange (PKCE) extension requires each authorization code to be redeemed only once and each access token to reach the client session that requested it. We used ProVerif to evaluate a model in which several sessions of the same client run in parallel, a code can be presented to the token endpoint repeatedly, and TLS is modeled per connection, so the attacker can open its own connection. Assuming that the server checks and records a used code atomically, ProVerif found no attack on single use, on the secrecy of the access token and code verifier, or on session binding, without an additional session identifier check at the token endpoint; the client still checks state. Without the used-code check, ProVerif found a token-request replay redeeming one code twice, although PKCE verification succeeded; in practice, this corresponds to a request reaching the server twice, such as a client retry. Without PKCE, the attacker obtains a token for an intercepted code, and one client session accepts another session’s token. Therefore, the used-code check and PKCE protect different properties. An injective correspondence detected replay only when its begin event was executed once per issued code.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.