Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
MEDIUM severity

Oauthlib: Timing Attack Vulnerability in PKCE code_verifier Comparison (CWE-208)GHSA-xpv3-w29h-x7cv

MEDIUMFix: oauthlib/oauthlib#963

GHSA-xpv3-w29h-x7cv is a medium-severity (CVSS 6.8) CWE-208 vulnerability in oauthlib. A fix is available for oauthlib — see the affected versions and patch details below.

Also known asCVE-2026-49265PYSEC-2026-4114
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 23, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • A successful exploit gives an attacker total control of the affected component, not partial access.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-xpv3-w29h-x7cv.

EPSS Exploitation Probability

via FIRST.org ↗
0.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs30th percentile — riskier than 30% of all scored CVEsHighest risk

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

GHSA-xpv3-w29h-x7cv by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected
🐍oauthlib

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

Summary

A timing side-channel vulnerability exists in the PKCE (RFC 7636) implementation of the Authorization Code Grant flow. The code_challenge_method_plain function uses Python's standard == operator for string comparison instead of a constant-time comparison function, potentially allowing timing-based attacks.

Affected Component

  • File: oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
  • Functions: code_challenge_method_plain, code_challenge_method_s256
  • Vulnerability Type: CWE-208 (Observable Timing Discrepancy)

Technical Details

Python's == operator uses short-circuit evaluation when comparing strings:

  1. Returns False immediately if lengths differ
  2. Compares characters left-to-right, stopping at first mismatch

This means comparison time varies linearly with the length of the common prefix between the attacker-supplied verifier and the stored challenge, creating a measurable timing oracle.

Proof of Concept

Tested locally against oauthlib source (network jitter eliminated to isolate pure Python execution time):

InputResultTime (10M iterations)
Wrong first char (B + A*49)Fast reject0.34106s
49 chars correct (A*49 + B)Deep compare0.37847s
Difference0.03741s

The ~37ms delta over 10M iterations corresponds to nanosecond-level differences per call, which are statistically exploitable under controlled conditions.

Attack Scenario

  1. Attacker intercepts authorization_code via Custom URI Scheme Hijacking
  2. PKCE blocks token request — attacker lacks code_verifier
  3. Attacker sends repeated requests to /token endpoint measuring response times
  4. Using timing oracle, attacker recovers code_verifier character by character
  5. Attacker obtains Access Token → Account Takeover

Note: Practical exploitability is limited due to the single-use nature of authorization codes and real-world network noise. However, the vulnerable pattern should be corrected as a defense-in-depth measure.

Recommended Fix

Replace == with hmac.compare_digest() for constant-time comparison:

cr: Elvin Latifli

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIoauthlib≥ 3.0.0&&< 4.0.04.0.0pip install --upgrade 'oauthlib==4.0.0'

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for oauthlib, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update oauthlib to 4.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-xpv3-w29h-x7cv is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

This vulnerability is rated as having a Moderate impact because successful exploitation requires multiple stringent prerequisites, including intercepting a valid authorization code, measuring high-resolution network response times, and an OAuth server implementation that permits repeated verification attempts without…

Workaround published by Red Hat
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
Source: Red Hat security advisory for GHSA-xpv3-w29h-x7cv (CC BY 4.0)
ProductFixed inAdvisory
Red Hat AI Inference Server 3.5rhaii/vllm-cuda-rhel9:1791473631RHSA-2026:82368
Red Hat AI Inference Server 3.5rhaii/vllm-cpu-rhel9:1791473614RHSA-2026:82415

Frequently Asked Questions

## Summary A timing side-channel vulnerability exists in the PKCE (RFC 7636) implementation of the Authorization Code Grant flow. The `code_challenge_method_plain` function uses Python's standard `==` operator for string comparison instead of a constant-time comparison function, potentially allowing timing-based attacks. ## Affected Component - File: `oauthlib/oauth2/rfc6749/grant_types/authorization_code.py` - Functions: `code_challenge_method_plain`, `code_challenge_method_s256` - Vulnerability Type: CWE-208 (Observable Timing Discrepancy) ## Technical Details Python's `==` operator
O3 Security · Impact-Aware SCA

Is GHSA-xpv3-w29h-x7cv in your dependencies?

Find it across PyPI, including transitive dependencies.

Oauthlib: Timing Attack Vulnerability in PKCE…