Vulnerability
CVE-2026-49265
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.
175 advisories report this vulnerability, across 9 ecosystems.
Advisories in Wolfi
- CGA-2fx9-2vh4-xqvf
- CGA-2r82-rch9-fjq2
- CGA-382r-mpjv-448f
- CGA-389c-phx3-4r7h
- CGA-42ch-3xgq-3v2q
- CGA-4jp8-876m-cg58
- CGA-55j5-j9px-77qh
- CGA-55w5-jfr2-3mfv
- CGA-5xw4-qwwc-mq6c
- CGA-64fq-4856-rh4f
- CGA-6gpx-g269-hpw9
- CGA-6vrg-pm8w-8j93
- CGA-6x7m-xh36-3v6v
- CGA-6xgj-8fm9-g4x9
- CGA-77vf-8m69-xvhm
- CGA-7f96-x7wc-gqqg
- CGA-8hw2-66r4-9rjg
- CGA-96m8-qmvr-36m9
- CGA-9wx7-239h-wcx7
- CGA-c54c-9cp2-r95h
- CGA-cqgx-76q8-qxp4
- CGA-f99w-m8fw-xg85
- CGA-gqw4-78xm-2594
- CGA-h7pc-5mg2-wgh3
- CGA-hmwg-cp4h-rx84
- CGA-hpfp-698g-qv3j
- CGA-j45g-cjh9-g69c
- CGA-m8v2-mrw6-mqfj
- CGA-p6pj-qx4h-w7xq
- CGA-r3wr-v24v-5w6w
- CGA-rpq9-vp45-r5fx
- CGA-vp5c-qw29-3wjx
- CGA-wc9m-c6v5-qqf8
- CGA-x3w5-g6xw-gppr
References
- https://github.com/oauthlib/oauthlib/commit/74664d3fe037a354e180e305135c6bab1747a6b0
- https://github.com/oauthlib/oauthlib/pull/963
- https://github.com/oauthlib/oauthlib/releases/tag/v4.0.0
- https://github.com/oauthlib/oauthlib/security/advisories/GHSA-xpv3-w29h-x7cv
- https://github.com/pypa/advisory-database/tree/main/vulns/oauthlib/PYSEC-2026-4114.yaml