Skip to main content
Vulnerability Database/CVE-2026-80179

CVE-2026-80179: jwcrypto Library DoS Vulnerability

CVE-2026-80179 is a denial of service vulnerability in the jwcrypto library that allows attackers to cause memory exhaustion through malformed JWE tokens. This post explains its impact, affected versions, and mitigation steps.

Published:

CVE-2026-80179 Overview

A flaw in the jwcrypto library allows remote attackers to trigger a denial-of-service condition when the library processes attacker-controlled JSON Web Encryption (JWE) tokens. An attacker sends a malformed JWE token containing an excessive number of period (.) delimiters. The JWE.deserialize() function then attempts to allocate memory proportional to the delimiter count, producing a MemoryError and terminating the processing service. Any service that accepts and deserializes untrusted JWE values through jwcrypto is affected. The weakness is tracked under CWE-770: Allocation of Resources Without Limits or Throttling.

Critical Impact

Unauthenticated remote attackers can exhaust process memory and crash any application that parses untrusted JWE tokens with jwcrypto.

Affected Products

  • jwcrypto Python library (latchset/jwcrypto)
  • Applications and services that call JWE.deserialize() on untrusted input
  • Downstream distributions packaging jwcrypto, including Red Hat products

Discovery Timeline

  • 2026-08-28 - CVE-2026-80179 published to NVD
  • 2026-08-31 - Last updated in NVD database

Technical Details for CVE-2026-80179

Vulnerability Analysis

The vulnerability resides in how jwcrypto parses the compact serialization form of a JWE token. The compact form is a string composed of five base64url-encoded segments separated by four periods: header.encrypted_key.iv.ciphertext.tag. The JWE.deserialize() routine splits the input on the period character before validating segment count or overall length. When an attacker submits a token containing many thousands of period delimiters, the split operation and subsequent per-segment processing force the interpreter to allocate memory proportional to the number of tokens, producing a MemoryError.

Because the parser performs allocation prior to structural validation, an attacker does not need valid cryptographic material. A short attacker-controlled string can expand into significant memory consumption during parsing.

Root Cause

The root cause is missing input size and structural validation before resource allocation, which maps to CWE-770. The deserializer does not enforce an upper bound on input length or on the number of delimiter-separated segments prior to processing.

Attack Vector

Exploitation requires only network access to a service that accepts JWE tokens over an interface such as HTTP. The attacker submits a crafted token to any endpoint that invokes JWE.deserialize() (for example, authentication, session, or webhook handlers). No authentication, user interaction, or prior privilege is required. Successful exploitation crashes the worker process, and repeated requests sustain the denial-of-service condition.

No verified public proof-of-concept is available at time of writing. Refer to the GitHub Security Advisory GHSA-96rv-c4vc-h4f4 for maintainer-provided technical details.

Detection Methods for CVE-2026-80179

Indicators of Compromise

  • HTTP request bodies or headers containing JWE-like strings with an abnormally high count of period (.) delimiters
  • Application logs showing MemoryError exceptions originating from jwcrypto/jwe.py or callers of JWE.deserialize()
  • Sudden worker process restarts or OOM-killer events correlated with authentication or token-processing endpoints
  • Repeated 5xx responses from endpoints that parse Authorization or token payloads

Detection Strategies

  • Instrument application error handling to log and alert on MemoryError originating in jwcrypto call paths
  • Add a preflight check at the web tier that rejects tokens exceeding a fixed byte length or delimiter count before they reach the deserializer
  • Correlate OOM-killer kernel messages and container restart events with inbound requests to token-handling routes

Monitoring Recommendations

  • Track memory utilization and process restart rates for services that consume JWE input
  • Alert on spikes in request payload size distributions at token-processing endpoints
  • Monitor rate of malformed token errors per source IP to identify probing activity

How to Mitigate CVE-2026-80179

Immediate Actions Required

Patch Information

The upstream fix is tracked in the latchset/jwcrypto project. See the GitHub Security Advisory GHSA-96rv-c4vc-h4f4 for the patched release and the Red Hat Bug Report #2524147 for distribution-specific package versions.

Workarounds

  • Enforce a strict maximum body size for all endpoints that accept JWE tokens at the reverse proxy or API gateway
  • Reject inputs that contain more than four period delimiters before invoking JWE.deserialize()
  • Apply per-source rate limiting on authentication and token-processing endpoints to blunt sustained abuse
  • Run token-processing workers with strict memory limits so an isolated crash does not degrade the host
bash
# Example nginx pre-filter: cap request body size for token endpoints
location /auth/ {
    client_max_body_size 8k;
    proxy_pass http://app_upstream;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.