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-48525

CVE-2026-48525: Uncontrolled Resource Consumption in PyJWT Detached JWS Verification

Alon Barad
Alon Barad
Software Engineer

Jun 15, 2026·6 min read·3 visits

Executive Summary (TL;DR)

PyJWT eagerly decodes JWS payload segments before validating the b64=false header configuration, enabling an unauthenticated remote Denial of Service attack via large, dummy payload strings.

PyJWT versions 2.8.0 through 2.12.1 are vulnerable to an unauthenticated Denial of Service (DoS) attack. When verifying detached JSON Web Signatures (JWS) using the unencoded-payload option (RFC 7797, b64=false), the library eagerly decodes the payload segment before verifying the header configuration or the cryptographic signature. This behavior enables a remote, unauthenticated attacker to inject an arbitrarily large payload segment, triggering excessive CPU and memory resource consumption prior to signature validation.

Vulnerability Overview

PyJWT is a widely deployed Python implementation of the JSON Web Token (JWT) and JSON Web Signature (JWS) specifications. Modern web applications rely on this library to decode, parse, and verify cryptographically signed tokens presented by untrusted external clients. The vulnerability designated as CVE-2026-48525 exposes these applications to unauthenticated denial of service attacks.

The flaw resides in the handling of detached JSON Web Signatures using the unencoded-payload option defined in RFC 7797. When processing these specific tokens, the library fails to properly restrict resource allocation during the parsing stage. An attacker can exploit this oversight to trigger disproportionate CPU and memory consumption on the application server.

This behavior constitutes a classic work amplification attack vector. The target server expends significant computational resources processing malformed or oversized data before executing cryptographic signature validation. Consequently, even requests containing invalid signatures can successfully exhaust system resources and degrade availability.

Root Cause Analysis

The root cause of CVE-2026-48525 lies in the order of operations inside the internal JWS parser within jwt/api_jws.py. Specifically, the internal helper function _load() is responsible for deserializing the incoming compact JWS string. This function splits the token into three distinct segments using the period separator: header, payload, and signature.

Under normal operations, the second segment contains the Base64URL-encoded payload of the JWS token. In vulnerable versions, _load() immediately attempts to decode this second segment using the base64url_decode() function. This decoding step occurs before the parser evaluates the protected header parameters.

Under RFC 7797, when the header specifies "b64": false, the inline payload segment of the JWS must be empty. The library is designed to subsequently discard any decoded inline payload and substitute it with a caller-provided detached payload. However, because the decoding step is executed first, the library processes whatever arbitrary data is present in the second segment, regardless of the header setting.

Code Analysis and Git Diff

Comparing the vulnerable and patched code paths in jwt/api_jws.py reveals the structural changes introduced in version 2.13.0. In vulnerable versions, the decoding logic was executed blindly within a simple try-except block. This allowed large payloads to be decoded regardless of the header configurations.

The patch introduces conditional checks that inspect the "b64" header parameter before executing the decoding function. If the header specifies that "b64" is false, the library validates that the incoming payload segment is entirely empty. If the segment contains data, the library raises a DecodeError immediately.

Below is the relevant portion of the patch from commit 95791b1759b8aa4f2203575d344d5c78564cdc81:

# Inside PyJWS._load in jwt/api_jws.py
if header.get("b64", True) is False:
    # Detached payload form (RFC 7515 Appendix F): the compact-form
    # payload segment must be empty; the caller supplies the actual
    # payload via the `detached_payload` argument in decode_complete.
    # Skipping the base64 decode here removes an unauthenticated work
    # amplifier.
    if payload_segment:
        raise DecodeError(
            "Payload segment must be empty when 'b64' is false."
        )
    payload = b""
else:
    try:
        payload = base64url_decode(payload_segment)
    except (TypeError, binascii.Error) as err:
        raise DecodeError("Invalid payload padding") from err

In addition to the decoding check, the patch introduces stricter validation for the "crit" header list. RFC 7797 mandates that if "b64" is set to false in the protected header, it must also be declared inside the "crit" array. This ensures that parsers that do not understand RFC 7797 will reject the token outright.

Exploitation Methodology

Exploiting CVE-2026-48525 requires minimal effort and no authentication. An attacker must identify an application endpoint that accepts detached JWS tokens with unencoded payloads. Because the signature check occurs after the payload decoding step, the attacker does not need a valid cryptographic key.

The attacker constructs a JWS header containing "alg", "b64": false, and "crit": ["b64"]. Instead of leaving the payload segment empty as required by the specification, the attacker inserts a very large block of random Base64URL characters. This string is appended between the header and a dummy signature.

When the server receives the malformed token, the Python interpreter begins allocating memory and utilizing CPU cycles to decode the massive string. If multiple concurrent requests are dispatched, the target server's worker processes will rapidly become saturated. This leads to severe latency or termination via out-of-memory errors.

> [!NOTE] > Because PyJWT is frequently deployed in synchronous Python web frameworks, a single worker process can be blocked entirely while parsing a single malicious token. This amplification effect makes the vulnerability highly efficient for attackers.

Impact Assessment

The primary impact of CVE-2026-48525 is a localized Denial of Service on the affected application. The vulnerability is assigned a CVSS v3.1 score of 5.3, reflecting a medium severity impact. The attack vector is remote and requires no privileges, giving it a low complexity threshold. While there is no impact on confidentiality or integrity, the availability of the application is degraded.

Systems that run memory-constrained container environments are particularly vulnerable to crashing. When the Python memory allocator attempts to handle multiple concurrent multi-megabyte string decoding operations, the operating system kernel may terminate the process. This causes immediate service disruption for all legitimate users.

Currently, there is no evidence of active exploitation in the wild. However, proof-of-concept analysis indicates that generating an exploit requires minimal technical sophistication.

Remediation and Mitigation

The standard remediation path is upgrading the PyJWT dependency to version 2.13.0 or higher. This version implements the necessary validation checks to discard non-compliant tokens before executing expensive decoding steps. Software developers should update their requirements files and rebuild container images accordingly.

For environments where immediate updates are not feasible, temporary workarounds can mitigate the risk. Implementing strict input validation filters on incoming request sizes at the reverse proxy or API gateway level is highly recommended. Limiting the maximum allowed length of HTTP authorization headers can block large payloads.

Network monitoring tools and Web Application Firewalls can be configured to inspect JWS patterns. Requests containing extremely large JWS headers or payload segments that do not conform to expected application constraints should be dropped. Developers should also audit their codebase to verify whether the detached_payload parameter is used in their JWS parsing implementations.

Official Patches

PyJWT ProjectGitHub Advisory Database entry for GHSA-w7vc-732c-9m39

Fix Analysis (1)

Technical Appendix

CVSS Score
5.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
EPSS Probability
0.25%
Top 84% most exploited

Affected Systems

PyJWT library installations

Affected Versions Detail

Product
Affected Versions
Fixed Version
PyJWT
PyJWT Project
>= 2.8.0, <= 2.12.12.13.0
AttributeDetail
CWE IDCWE-400
Attack VectorNetwork (AV:N)
CVSS Score5.3 (Medium)
Exploit StatusPoC Analysis / None
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-400
Uncontrolled Resource Consumption

The program does not properly control the allocation and maintenance of a limited resource on behalf of an actor, enabling a Denial of Service.

Vulnerability Timeline

Security fix committed to PyJWT repository
2026-05-21
CVE-2026-48525 published via GHSA-w7vc-732c-9m39
2026-05-28
NVD updates CVE analysis record
2026-06-01

References & Sources

  • [1]GitHub Security Advisory
  • [2]GitHub Fix Commit
  • [3]CVE Record
  • [4]Wiz Vulnerability Database entry

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

•2 minutes ago•GHSA-RQ7W-G337-39QQ
6.5

GHSA-RQ7W-G337-39QQ: Project Directory Path and Workspace UUID Disclosure in Nuxt Dev Server

A security vulnerability in the Nuxt development server allows unauthenticated local or cross-origin attackers to retrieve the host machine's absolute project directory path and a persistent Chrome DevTools workspace UUID. The issue stems from an unprotected endpoint registered at `/.well-known/appspecific/com.chrome.devtools.json` which does not validate the HTTP Host, Origin, or Referer headers.

Amit Schendel
Amit Schendel
0 views•6 min read
•about 3 hours ago•GHSA-WQVQ-JVPQ-H66F
5.4

GHSA-WQVQ-JVPQ-H66F: Security Control Bypass in Nodemailer via Transport Serialization

Nodemailer prior to version 8.0.9 contains a security control bypass vulnerability. Transport-level configuration parameters designed to restrict local file system access and remote URL requests are not propagated to all content-resolution execution paths. This failure allows unauthorized local file inclusion and server-side request forgery when the application utilizes specific transports or processing flags.

Alon Barad
Alon Barad
2 views•6 min read
•about 3 hours ago•GHSA-268H-HP4C-CRQ3
5.4

GHSA-268h-hp4c-crq3: CRLF Injection via List-* Header Comments in Nodemailer

GHSA-268h-hp4c-crq3 is a Carriage Return Line Feed (CRLF) injection vulnerability in the Nodemailer npm package affecting versions up to and including 8.0.8. The library allows arbitrary email header injection when parsing user-controlled comments within list headers (such as List-Unsubscribe or List-ID). This occurs because list headers bypass standard validation by utilizing an internal 'prepared' flag, causing unsanitized newlines to be emitted directly into the outgoing RFC822 mail stream. This exploit allows remote attackers to inject custom, unauthorized mail headers, disrupting signature checks, bypassing filters, or spoofing parameters.

Alon Barad
Alon Barad
3 views•8 min read
•about 4 hours ago•CVE-2026-48524
3.7

CVE-2026-48524: Remote Cache Eviction and Authentication Denial of Service in PyJWT

A logic flaw in PyJWT's PyJWKClient class allows remote unauthenticated attackers to trigger a complete authentication outage. By transmitting a volume of JWTs containing randomized, non-existent Key ID (kid) values, attackers force synchronous outbound JWKS resolution queries. When these queries fail or time out, a defect in the error cleanup code overwrites the local cache of valid signing keys with None, causing a denial of service.

Alon Barad
Alon Barad
4 views•8 min read
•about 4 hours ago•CVE-2026-49982
8.2

CVE-2026-49982: Path Traversal Bypass via Type Confusion in node-tmp

A high-severity type-confusion path traversal vulnerability (CVE-2026-49982 / GHSA-7c78-jf6q-g5cm) exists in the node-tmp package version 0.2.6. The vulnerability allows remote attackers to bypass path validation checks by passing non-string data types such as Arrays or duck-typed Objects into options like prefix, postfix, or template. Because the library relies on the .includes() method without verifying the input type, standard array checks evaluate differently than string checks. Downstream string coercion subsequently restores the traversal sequence, allowing files and directories to be created outside the designated temporary directory root. This can result in arbitrary file writes and potential local file execution depending on application context.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 6 hours ago•CVE-2026-47347
5.3

CVE-2026-47347: Open Redirect Vulnerability in TYPO3 CMS GeneralUtility::sanitizeLocalUrl

CVE-2026-47347 is an open redirect vulnerability affecting multiple TYPO3 CMS versions. The issue resides in GeneralUtility::sanitizeLocalUrl, where an insufficient blocklist validation implementation fails to prevent browsers from normalizing malformed relative paths into external protocol-relative redirections. Attackers can exploit this to conduct phishing, session hijacking, or credential harvesting campaigns.

Alon Barad
Alon Barad
3 views•7 min read