CVE-2026-49265
Deferred Deferred - Pending Action

OAuthLib PKCE Timing Side-Channel Vulnerability

Vulnerability report for CVE-2026-49265, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-13

Last updated on: 2026-10-16

Assigner: GitHub, Inc.

Description

OAuthLib is an implementation of the OAuth request-signing logic for Python 3.6+. From 3.0.0 until 4.0.0, OAuthLib's PKCE checks in oauthlib/oauth2/rfc6749/grant_types/authorization_code.py compare attacker-supplied code_verifier values with stored challenges using ordinary string equality in code_challenge_method_plain and code_challenge_method_s256. Because the comparison can return after a length difference or the first mismatching character, repeated token endpoint measurements can reveal common-prefix timing information that could potentially allow recovery of the code_verifier, unauthorized access-token acquisition, and account takeover. Practical exploitation requires an intercepted, single-use authorization code and enough measurements to overcome real-world network noise; the local timing benchmark does not establish practical remote account takeover, so the weakness remains a defense-in-depth concern. This issue is fixed in version 4.0.0.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-13
Last Modified
2026-10-16
Generated
2026-10-19
AI Q&A
2026-10-13
EPSS Evaluated
2026-10-18
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
oauthlib oauthlib >= 3.0.0, < 4.0.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-208 Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a timing side-channel vulnerability in OAuthLib's PKCE implementation for Python 3.6+. It affects versions 3.0.0 to 4.0.0. The issue occurs when comparing attacker-supplied code_verifier values with stored challenges using standard string equality (==). This comparison method reveals timing differences based on common prefixes, allowing attackers to infer the code_verifier character by character. The vulnerability could potentially enable unauthorized access-token acquisition and account takeover.

Detection Guidance

Detecting this vulnerability requires checking the OAuthlib version in use. Run: pip show oauthlib. If the version is between 3.0.0 and 3.3.1, the system is vulnerable. Additionally, inspect the code_challenge_method_plain and code_challenge_method_s256 functions in oauthlib/oauth2/rfc6749/grant_types/authorization_code.py for use of == operator instead of hmac.compare_digest().

Impact Analysis

An attacker could exploit this to recover the code_verifier used in OAuth 2.0 authorization flows. With this information, they might gain unauthorized access to user accounts or obtain access tokens. Practical exploitation requires intercepting a single-use authorization code and overcoming network noise, making it challenging but not impossible.

Compliance Impact

This vulnerability could potentially violate compliance requirements under GDPR and HIPAA by enabling unauthorized access to user accounts through timing attacks on OAuth2 PKCE implementations. Exploitation may lead to unauthorized data access or account takeover, which conflicts with principles of data protection and security required by these regulations.

Mitigation Strategies

Upgrade OAuthlib to version 4.0.0 or later immediately. If upgrading is not possible, apply the patch by replacing == with hmac.compare_digest() in the PKCE comparison functions. Ensure all OAuth2 providers using OAuthlib are updated to prevent timing attacks.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-49265. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart