p PatchFirst

CVE-2026-49265

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

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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.

CVSS 6.8 · Medium · EPSS 0.2% · Public exploit · Fix available

Published
Updated

Stack: system · python

Affected products and versions

  • oauthlib

    Versions
    • >= 3.0.0, < 4.0.0: Affected

    No fix published

  • python-oauthlib Debian:12

    Versions
    • 3.2.2-1
    • 3.2.2-2
    • 3.2.2-3
    • 3.2.2-4
    • 3.3.1-1
    • 3.3.1-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • python-oauthlib Debian:13

    Versions
    • 3.2.2-3
    • 3.2.2-4
    • 3.3.1-1
    • 3.3.1-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • python-oauthlib Debian:14

    Versions
    • 3.2.2-3
    • 3.2.2-4
    • 3.3.1-1
    • 3.3.1-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • oauthlib PyPI

    Versions
    • 3.0.0
    • 3.0.1
    • 3.0.2
    • 3.1.0
    • 3.1.1
    • 3.2.0
    • 3.2.1
    • 3.2.2
    • 3.3.0
    • 3.3.1
    Affected ranges
    • ECOSYSTEM: ≥ 3.0.0, < 4.0.0

    Update to 4.0.0

  • python-oauthlib Ubuntu:16.04:LTS

    Versions
    • 1.0.0-1
    • 1.0.3-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • python-oauthlib Ubuntu:18.04:LTS

    Versions
    • 2.0.1-1
    • 2.0.4-1
    • 2.0.6-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • python-oauthlib Ubuntu:20.04:LTS

    Versions
    • 2.1.0-1
    • 3.1.0-1ubuntu1
    • 3.1.0-1ubuntu2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • python-oauthlib Ubuntu:22.04:LTS

    Versions
    • 3.1.0-2
    • 3.1.1-1
    • 3.2.0-1
    • 3.2.0-1ubuntu0.1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • python-oauthlib Ubuntu:24.04:LTS

    Versions
    • 3.2.2-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • python-oauthlib Ubuntu:26.10

    Versions
    • 3.3.1-1build1
    • 3.3.1-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • python-oauthlib Ubuntu:26.04:LTS

    Versions
    • 3.2.2-3
    • 3.3.1-1
    • 3.3.1-1build1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →