CVE-2026-103001

PyJWT.decode() reintroduces options-dict mutation, enabling silent claim-verification bypass on dict reuse

Published Sep 30, 2026 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
Description
PyJWT is a Python implementation of JSON Web Token standards. From 2.11.0 through 2.13.0, PyJWT's PyJWT._merge_options() method can modify a caller-supplied mutable options mapping when verify_signature is false. If an application reuses that same mapping for a later decode() or decode_complete() call and changes verify_signature to true, the mapping can retain false values for expiration, not-before, issued-at, audience, issuer, subject, and JWT ID checks. A signed token with invalid registered claims can then be accepted without disabling signature verification, but applications that create a fresh options mapping for each call are not affected.

Analysis

AI-generated

Technical impact

The flaw emerges when PyJWT's internal _merge_options method can alter a mutable options mapping supplied by the caller when signature verification is disabled. If the same mapping object is later reused with signature verification turned on, the mutated values remain and prevent expiration, not‑before, issued‑at, audience, issuer, subject, and JWT ID checks from being performed. This allows an attacker to craft a signed token containing invalid claims that will still be accepted by the library. The weakness corresponds to CWE-358 – mutability of data structures leading to unexpected side effects, and CWE-471 – improper handling of mutable objects, resulting in compromised token validation and potential unauthorized access.

Affected Systems

The vulnerability affects the PyJWT package from jpadilla:pyjwt. Versions 2.11.0 through 2.13.0 are impacted. Applications that reuse an options dictionary across decode calls may be affected.

Risk and Exploitability

The CVSS score for this issue is 6.5, indicating moderate severity. The EPSS score is not available, and the vulnerability is not listed in CISA's KEV catalogue. Exploitation requires code that supplies a mutable options mapping, reuses it between decoding calls, and toggles the verify_signature flag. As a result, the risk is primarily faced by libraries or applications that deliberately reuse options dictionaries, and the likelihood of a remote exploitation scenario is low unless the attacker controls token decoding logic.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade PyJWT to the latest release (2.14.0 or newer) where the flaw has been fixed.
  • If upgrading is not immediately possible, modify your code to instantiate a fresh options mapping for each decode() or decode_complete() call instead of reusing a mutable object.
  • Audit all token‑decoding logic in your application to ensure no shared mutable options dictionaries are passed between calls, and that verify_signature is set appropriately.

Generated by OpenCVE AI on October 1, 2026 at 01:48 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-gvp8-978c-rx2q PyJWT.decode() reintroduces options-dict mutation, enabling silent claim-verification bypass on dict reuse
History
Type Values Removed Values Added
First Time appeared Pyjwt Project
Pyjwt Project pyjwt
CPEs cpe:2.3:a:pyjwt_project:pyjwt:*:*:*:*:*:*:*:*
Vendors & Products Pyjwt Project
Pyjwt Project pyjwt
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Jpadilla
Jpadilla pyjwt
Vendors & Products Jpadilla
Jpadilla pyjwt
Type Values Removed Values Added
Description PyJWT is a Python implementation of JSON Web Token standards. From 2.11.0 through 2.13.0, PyJWT's PyJWT._merge_options() method can modify a caller-supplied mutable options mapping when verify_signature is false. If an application reuses that same mapping for a later decode() or decode_complete() call and changes verify_signature to true, the mapping can retain false values for expiration, not-before, issued-at, audience, issuer, subject, and JWT ID checks. A signed token with invalid registered claims can then be accepted without disabling signature verification, but applications that create a fresh options mapping for each call are not affected.
Title PyJWT.decode() reintroduces options-dict mutation, enabling silent claim-verification bypass on dict reuse
Weaknesses CWE-471
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N'}

Weaknesses
  • CWE-358

    Improperly Implemented Security Check for Standard

  • CWE-471

    Modification of Assumed-Immutable Data (MAID)

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 5, 2026, 11:47 PM
Reserved
Sep 29, 2026, 8:46 PM
Status
Analyzed
Published
Sep 30, 2026, 10:16 PM
Modified
Oct 8, 2026, 1:13 PM
Severity
Moderate
Public date
Sep 30, 2026, 9:15 PM