{"id":"CVE-2026-49265","published":"2026-10-13T15:47:11Z","modified":"2026-10-13T16:19:39Z","title":"OAuthLib: Timing Attack Vulnerability in PKCE code_verifier Comparison","vendor":"oauthlib","product":"oauthlib","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00242,"percentile":0.15711,"provenance":"source"},"cwes":[{"id":"CWE-208","name":"Observable Timing Discrepancy"}],"references":[{"url":"https://github.com/oauthlib/oauthlib/security/advisories/GHSA-xpv3-w29h-x7cv","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/oauthlib/oauthlib/pull/963","tags":["x_refsource_MISC"]},{"url":"https://github.com/oauthlib/oauthlib/commit/74664d3fe037a354e180e305135c6bab1747a6b0","tags":["x_refsource_MISC"]},{"url":"https://github.com/oauthlib/oauthlib/releases/tag/v4.0.0","tags":["x_refsource_MISC"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/oauthlib/PYSEC-2026-4114.yaml","tags":["x_refsource_MISC"]}],"priority":{"score":7.9,"factors":[{"name":"EPSS percentile","points":3.14},{"name":"CVSS severity","points":4.76}]},"vendorSlug":"oauthlib","affectedVersions":[{"vendor":"oauthlib","product":"oauthlib","versions":[">= 3.0.0, < 4.0.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-10-13T16:19:32.600149Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"oauthlib","vulnerableRanges":[">=3.0.0, <4.0.0"],"patched":["4.0.0"],"from":["GHSA-xpv3-w29h-x7cv","PYSEC-2026-4114"],"provenance":"source"}],"summary":{"text":"OAuthLib's PKCE checks in the authorization_code grant (oauthlib/oauth2/rfc6749/grant_types) compare attacker-supplied code_verifier values against stored challenges with ordinary string equality for the plain and S256 methods, leaking timing information about the comparison. An attacker who can repeatedly measure token endpoint responses, and who has an intercepted single-use authorization code, may be able to use common-prefix timing to recover the code_verifier and obtain an access token.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:12:16Z"},"euvd":{"id":"EUVD-2026-98833","exploited":false,"provenance":"source"}}