CVE-2026-49265 OAuthLib: Timing Attack Vulnerability in PKCE code_verifier Comparison

Medium 6.8 Published Updated

Timing side-channel in OAuthLib PKCE verification allows potential recovery of code_verifier, leading to unauthorized access token acquisition and account takeover.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-49265?

CVE-2026-49265 is a medium-severity vulnerability in oauthlib, published on 13 Oct 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-208

Which versions are affected by CVE-2026-49265?

3 open source packages ship an affected version, including oauthlib.

PackageAffectedFixed in
oauthlib PyPIFrom 3.0.04.0.0
oauthlib PyPIFrom 3.0.04.0.0
oauthlib PyPIFrom 3.0.04.0.0

How do I fix CVE-2026-49265?

Upgrade oauthlib to 4.0.0 or later.

Is CVE-2026-49265 being exploited?

There is no known exploitation of CVE-2026-49265 in the wild and no public exploit code.

Sources

Also known as AZL-108045, CLEANSTART-2026-NO84858, CLEANSTART-2026-PQ13819, CLEANSTART-2026-ZA90599, DEBIAN-CVE-2026-49265, ECHO-e653-cb4c-55e4 and 27 more.

Is CVE-2026-49265 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free