CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-103001

CVE-2026-103001: State Pollution in PyJWT Option Merging Leads to Claim Verification Bypass

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 1, 2026·6 min read·53 visits

Executive Summary (TL;DR)

A state pollution flaw in PyJWT's options merger mutates reused configuration dictionaries. When signature verification is toggled from False to True, critical claim verifications like expiration and audience checks remain permanently disabled, allowing expired or invalid tokens to be accepted.

PyJWT versions 2.11.0 through 2.13.0 suffer from a state pollution vulnerability in the `_merge_options` method. When an application passes a mutable configuration mapping with signature verification disabled, the library modifies the object in-place. If this same dictionary is reused for subsequent verified decode operations, standard claim verifications (such as expiration, audience, and issuer validation) are silently bypassed.

Vulnerability Overview

PyJWT is a Python implementation of JSON Web Token (JWT) standards widely used in web applications and backend microservices. Between versions 2.11.0 and 2.13.0, PyJWT is susceptible to a state pollution vulnerability within its internal option merging mechanism.

The vulnerability is triggered when a caller-supplied, mutable mapping (such as a standard Python dictionary) is passed to decode() or decode_complete() with signature verification set to disabled. Under these conditions, PyJWT's _merge_options() method directly modifies the caller's options mapping in-place, adding or modifying registered claim verification options to false.

This in-place modification permanently alters the configuration state of the reused mapping. If the calling application subsequently re-enables signature verification on that same object, the claim validation steps (such as expiration, audience, and issuer checks) remain disabled. This behavior allows attackers to present cryptographically valid but expired tokens, which the library accepts without throwing validation errors.

Root Cause Analysis

In Python, dictionary structures are passed by reference. When an application provides an options configuration dictionary to PyJWT.decode(), the library merges default options with user-provided settings inside jwt/api_jwt.py.

The logic in the vulnerable version of _merge_options() evaluates whether signature verification is disabled. If verify_signature is false, PyJWT defensively sets default verification flags to false directly within the input object itself rather than a localized copy. This operation mutates the caller's shared state directly.

When the application processes a second token and changes verify_signature back to true, the previously injected false parameters remain in the dictionary. Because PyJWT checks the specific dictionary keys for explicit verification overrides, the presence of these mutated keys bypasses checks for expiration (verify_exp), not-before (verify_nbf), issued-at (verify_iat), audience (verify_aud), issuer (verify_iss), subject (verify_sub), and JWT ID (verify_jti).

Code Analysis

The vulnerability lies in jwt/api_jwt.py inside the _merge_options function. Prior to the patch, the mapping passed to the function was not isolated from the original reference.

Below is the vulnerable implementation:

def _merge_options(self, options: Options | None = None) -> FullOptions:
    if options is None:
        return self.options
 
    # (defensive) set defaults for verify_x to False if verify_signature is False
    if not options.get("verify_signature", True):
        options["verify_exp"] = options.get("verify_exp", False)
        options["verify_nbf"] = options.get("verify_nbf", False)
        options["verify_iat"] = options.get("verify_iat", False)
        options["verify_aud"] = options.get("verify_aud", False)
        options["verify_iss"] = options.get("verify_iss", False)
        options["verify_sub"] = options.get("verify_sub", False)
        options["verify_jti"] = options.get("verify_jti", False)
    return {**self.options, **options}

The patch addresses this state pollution by converting the incoming mapping to a standard, shallow-copied dictionary utilizing dict(options) and casting it as an Options object. This ensures that any key assignment affects only the isolated copy of the options mapping.

Below is the patched implementation:

def _merge_options(self, options: Options | None = None) -> FullOptions:
    if options is None:
        return self.options
 
    # Convert and isolate the incoming options mapping to prevent pollution
    merged_options = cast("Options", dict(options))
 
    # (defensive) set defaults for verify_x to False if verify_signature is False
    if not merged_options.get("verify_signature", True):
        merged_options["verify_exp"] = merged_options.get("verify_exp", False)
        merged_options["verify_nbf"] = merged_options.get("verify_nbf", False)
        merged_options["verify_iat"] = merged_options.get("verify_iat", False)
        merged_options["verify_aud"] = merged_options.get("verify_aud", False)
        merged_options["verify_iss"] = merged_options.get("verify_iss", False)
        merged_options["verify_sub"] = merged_options.get("verify_sub", False)
        merged_options["verify_jti"] = merged_options.get("verify_jti", False)
    return {**self.options, **merged_options}

Exploitation & Proof of Concept

Exploitation of this vulnerability requires that the target application reuse an options configuration dictionary across multiple decode requests. An attacker targeting the application must provide an expired or claim-mismatched token that has been cryptographically signed by the correct backend secret.

The following Python script reproduces the state pollution and demonstrates the subsequent verification bypass:

import jwt
import time
 
SECRET_KEY = "super_secure_secret_key"
ALGORITHM = "HS256"
 
# Generate a token that expired in the past
expired_payload = {
    "user_id": 1337,
    "exp": int(time.time()) - 3600
}
expired_token = jwt.encode(payload=expired_payload, key=SECRET_KEY, algorithm=ALGORITHM)
 
# Create a reusable options mapping
shared_options = {
    "verify_signature": False
}
 
# Trigger state pollution via unverified decoding
jwt.decode(jwt=expired_token, options=shared_options)
 
# Attempt to enforce signature verification while reusing the polluted mapping
shared_options["verify_signature"] = True
 
try:
    # This call should raise ExpiredSignatureError, but it returns the decoded payload
    decoded = jwt.decode(
        jwt=expired_token,
        key=SECRET_KEY,
        algorithms=[ALGORITHM],
        options=shared_options
    )
    print("Vulnerable: Token accepted despite expiration check being active")
    print(decoded)
except jwt.ExpiredSignatureError:
    print("Secure: Expired signature exception raised")

If the application utilizes the vulnerable version of PyJWT and reuses shared_options, the script will bypass the expiration check. If the PyJWT installation has been upgraded or patched, an ExpiredSignatureError is raised.

Impact Assessment

The impact of this state pollution vulnerability is classified as Medium (CVSS 6.5). The complexity of the attack is High, as exploitation relies entirely on how the consuming application implements PyJWT and manages configuration lifecycles. If an application never reuses options mappings, the vulnerability cannot be triggered.

For systems that do reuse options configuration mappings, the vulnerability bypasses critical logical controls. Attackers can replay expired authentication tokens or present tokens intended for different audiences, which can result in privilege escalation or session hijacking.

The vulnerability is a regression of similar mutable dictionary issues identified in previous developer discussions (such as Issue 679). No active exploitation in the wild has been reported, and the vulnerability has not been added to CISA's Known Exploited Vulnerabilities catalog.

Remediation & Detection

To fully remediate CVE-2026-103001, update PyJWT to version 2.14.0 or higher. The fixed version ensures that all input mapping parameters are localized through copy operations prior to modifications.

In scenarios where immediate upgrading is not feasible, developers should adjust their implementation code to prevent dictionary reuse. Instead of modifying or referencing a shared dictionary, code should instantiate a fresh dictionary for each decode call:

# Insecure reuse pattern
jwt.decode(token, key, options=settings.JWT_CONFIG)
 
# Secure non-reused instantiation
jwt.decode(token, key, options=dict(settings.JWT_CONFIG))

Security teams can identify vulnerable patterns by scanning codebases with static analysis rules that alert on modified dictionary parameters passed directly to jwt.decode interfaces.

Fix Analysis (1)

Technical Appendix

CVSS Score
6.5/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N

Affected Systems

Python applications utilizing PyJWT version 2.11.0 through 2.13.0 with reused or shared verification options dictionaries

Affected Versions Detail

Product
Affected Versions
Fixed Version
PyJWT
PyJWT Project
>= 2.11.0, <= 2.13.02.14.0
AttributeDetail
CWE IDCWE-471: Modification of Assumed-Immutable Data (MAID)
Attack VectorNetwork (Unauthenticated, high complexity due to application logic dependence)
CVSS v3.16.5 (Medium)
EPSS ScoreN/A
ImpactClaim verification bypass (Expiration, Audience, Issuer checks bypassed)
Exploit StatusProof-of-Concept (PoC) available
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1556Modify Authentication Process
Credential Access
CWE-471
Modification of Assumed-Immutable Data (MAID)

The product allows input to modify data that is assumed to be immutable, causing a state mutation which can be leveraged to bypass logical checks in subsequent program operations.

Known Exploits & Detection

GitHub Issue Tracker (Options Mutation Case)Original issue track outlining persistent side-effects on state dictionaries during merging procedures.

References & Sources

  • [1]GitHub Security Advisory: Claim Verification Bypass due to State Pollution
  • [2]Fix commit implementing dict conversion within _merge_options
  • [3]PyJWT Issue 679: Dictionary Mutated in-place During Decoding Process
  • [4]Official CVE-2026-103001 Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-128087
3.7

CVE-2026-128087: Premature Key Exchange Callback Invocation Prior to Host Key Verification in russh

CVE-2026-128087 (GHSA-9264-jvgf-6w2f) is an incorrect behavior order (CWE-696) and improper authorization (CWE-863) vulnerability in the russh Rust SSH library, affecting versions 0.55.0 through 0.65.0. During the initial SSH key exchange (KEX) handshake, the client state machine invokes the client::Handler::kex_done() callback—providing the negotiated raw shared secret bytes—prior to validating the remote server's host key or certificate via check_server_key(). Consequently, an untrusted or rogue SSH server can complete cryptographic key agreement and force a connecting client to execute side-effecting application logic inside kex_done() before the server's identity is checked and rejected.

Amit Schendel
Amit Schendel
6 views•10 min read
•1 day ago•CVE-2026-128082
7.5

CVE-2026-128082: Uncontrolled Recursion and Denial of Service in AutoMapper via Constructor Parameter Mapping

CVE-2026-128082 (GHSA-6vhm-j9h7-f9gh) is an uncontrolled recursion vulnerability (CWE-674) in AutoMapper, a convention-based object-object mapper for .NET. When mapping nested or self-referential types into destination models that rely on parameterized constructors, C# positional records, or recursive ConstructUsing expressions, AutoMapper evaluates child constructor arguments prior to incrementing the parent's recursion depth counter. This ordering flaw bypasses both explicit MaxDepth limits and the default depth limit of 64. An unauthenticated remote attacker can supply deeply nested input payloads to affected endpoints, exhausting the thread call stack and triggering an uncatchable System.StackOverflowException that terminates the hosting .NET process.

Amit Schendel
Amit Schendel
7 views•11 min read
•1 day ago•CVE-2026-128080
5.8

CVE-2026-128080: Sensitive Query Parameter Disclosure on Incoming Server Spans in OpenTelemetry JavaScript (@opentelemetry/instrumentation-http)

An information exposure vulnerability in the @opentelemetry/instrumentation-http package for OpenTelemetry JavaScript versions 0.204.0 prior to 0.222.0 causes incoming HTTP server spans to record raw, unredacted query string parameters under the url.query attribute. While outgoing client spans applied built-in and user-configured query parameter redaction, incoming server spans bypassed this sanitization completely, resulting in the transmission of sensitive credentials such as pre-signed cloud URLs and API tokens to external observability backends.

Alon Barad
Alon Barad
7 views•10 min read
•1 day ago•CVE-2026-128089
7.5

CVE-2026-128089: Uncontrolled Resource Consumption in dnspython WKS Record Parser

CVE-2026-128089 is an uncontrolled resource consumption vulnerability in the dnspython toolkit for Python, affecting all versions prior to 2.9.2. When parsing Well-Known Service (WKS) records from text via dns.rdtypes.IN.WKS.WKS.from_text(), the parser fails to validate that numeric service port identifiers fall within the RFC 1035 valid range of 0 through 65535. An attacker capable of supplying untrusted zone files or RDATA text strings containing an arbitrarily large service port integer can force the parser to allocate an unbounded bitmap array using an inefficient linear append loop, resulting in severe CPU exhaustion, application hangs, or Out-Of-Memory (OOM) process termination.

Amit Schendel
Amit Schendel
7 views•10 min read
•1 day ago•CVE-2026-126347
3.1

CVE-2026-126347: Open Redirect via Triple-Slash Redirect Paths in Tornado RedirectHandler

CVE-2026-126347 (GHSA-5cjw-f85j-cv6r) is an open redirect vulnerability (CWE-601) in Tornado, an asynchronous Python networking library and web framework. The flaw resides in tornado.web.RedirectHandler when dynamic URL redirection templates incorporate unvalidated user input. Due to a parser differential between RFC 3986 (used by Python's urllib.parse.urlsplit) and the WHATWG URL Standard (used by modern web browsers), inputs containing three or more leading slashes bypass Tornado 6.6.0's validation logic, allowing unauthenticated attackers to redirect users to arbitrary external domains.

Alon Barad
Alon Barad
8 views•11 min read
•1 day ago•CVE-2026-128123
5.9

CVE-2026-128123: Uncaught Exception and Denial of Service in SvelteKit @sveltejs/adapter-node

A Denial of Service (DoS) vulnerability exists in @sveltejs/adapter-node versions 5.5.7 and 6.0.0-next.0 through 6.0.0. When a SvelteKit server route returns a direct response from a fetch() call with a Content-Type of text/event-stream, the Node.js adapter attempts to mutate the response headers to disable proxy buffering. Because headers returned directly by the WHATWG Fetch API carry an immutable guard, this mutation throws an unhandled TypeError, terminating the underlying Node.js process and denying service to all active and subsequent clients.

Alon Barad
Alon Barad
7 views•9 min read