Impact
OAuthLib, an OAuth request‑signing library for Python, performs equality checks of the PKCE code_verifier against the stored code_challenge using ordinary string comparison. Because the comparison stops at the first mismatching byte or when lengths differ, an attacker who can observe timing for repeated requests can infer common prefixes of the verifier. This side‑channel could help recover the full code_verifier, which, if combined with an intercepted one‑time authorization code, might allow the attacker to request an access token and take over the associated account. The vulnerability is mitigated by using a constant‑time comparison routine, but practical remote exploitation would require gathering many measurements to overcome network latency noise, making it a defense‑in‑depth concern rather than an immediately exploitable weakness.
Affected Systems
The flaw exists in OAuthLib versions 3.0.0 through 3.x. (i.e., any release prior to 4.0.0). Users of the oauthlib package in these versions are affected.
Risk and Exploitability
The CVSS score of 6.8 indicates a moderate severity. The EPSS score is unavailable, and the vulnerability is not listed in CISA’s KEV catalog. The likely attack vector involves an attacker who has obtained an intercepted, single‑use authorization code and can perform repeated network measurements against the token endpoint to recover the code_verifier. Because the side‑channel relies on timing measurements, the feasibility of real‑world exploitation remains uncertain, and the issue is considered a threat that warrants mitigation rather than an active exploited vulnerability.
OpenCVE Enrichment
Github GHSA