CVE-2026-119283
Unchecked JWE recipients cause unlimited RSA decryptions, enabling CPU DoS.
- CVSS 7.5
- CWE-400
- Resource Management
- Remote
joserfc is a Python library that provides an implementation of several JSON Object Signing and Encryption (JOSE) standards. Prior to 1.7.5, joserfc.jwe.decrypt_json() accepts a JWE General JSON Serialization recipients array without a count limit and calls decrypt_cek() for every entry. An unauthenticated attacker who can submit a JWE to an endpoint using an RSA key-management algorithm can choose the number of private-key decryption operations performed by one request. The verify_all_recipients option does not reduce this work because the affected loop processes every recipient before consulting that setting, allowing repeated requests to exhaust service CPU without affecting confidentiality or integrity. This issue is fixed in version 1.7.5.
- CWE
- CWE-400
- CVSS base score
- 7.5
- Published
- 2026-10-29
- OWASP
- A05 Security Misconfiguration
- Orthogonal defect classification
- Timing/Serialization
- Code defect classification
- Timing Issues
- Category
- Resource Management
- Subcategory
- Resource Exhaustion
- Accessibility scope
- Remote
- Impact
- Denial of Service (DoS)
- Affected component
- Python
- Fixed by upgrading
- Yes
Solution
Upgrade joserfc to version 1.7.5 or later.
Vulnerable code sample
import json
from joserfc import jwe
def decrypt_message(jwe_json: str, private_key, verify_all_recipients: bool = False):
"""
Decrypt a JWE General JSON Serialization string.
"""
data = json.loads(jwe_json)
# The JWE spec allows a "recipients" array; joserfc.jwe.decrypt_json()
# processes each entry sequentially.
recipients = data.get("recipients", [])
# VULNERABLE: Unbounded loop over recipients allows attacker‑controlled CPU load
for rec in recipients:
# Attempt to decrypt the Content Encryption Key (CEK) for each recipient
cek = jwe.decrypt_cek(rec, private_key)
if cek is not None:
# Decrypt the payload using the derived CEK
plaintext = jwe.decrypt_payload(data, cek)
if not verify_all_recipients:
return plaintext
# If verify_all_recipients is True, we must have succeeded for every recipient
if verify_all_recipients and len(recipients) > 0:
# All recipients processed; return the last successful plaintext
return plaintext
raise ValueError("Decryption failed for all recipients")Patched code sample
import json
from joserfc import jwe
MAX_RECIPIENTS = 5 # FIX: impose a reasonable upper bound on recipient processing
def decrypt_message(jwe_json: str, private_key, verify_all_recipients: bool = False):
"""
Decrypt a JWE General JSON Serialization string.
"""
data = json.loads(jwe_json)
recipients = data.get("recipients", [])
# FIX: enforce limit before entering the decryption loop
if len(recipients) > MAX_RECIPIENTS:
raise ValueError(f"Too many recipients (>{MAX_RECIPIENTS})")
for rec in recipients:
cek = jwe.decrypt_cek(rec, private_key)
if cek is not None:
plaintext = jwe.decrypt_payload(data, cek)
if not verify_all_recipients:
return plaintext
if verify_all_recipients and len(recipients) > 0:
return plaintext
raise ValueError("Decryption failed for all recipients")Published fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- feat: add max_recipients on JWERegistry (authlib/joserfc)
src/joserfc/_rfc7516/json.py · extract_general_json,src/joserfc/_rfc7516/message.py · _perform_decrypt,src/joserfc/_rfc7516/registry.py,src/joserfc/_rfc7516/registry.py · JWERegistry.__init__
Cite this entry
@misc{vaitp:cve2026119283,
title = {{Unchecked JWE recipients cause unlimited RSA decryptions, enabling CPU DoS.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-119283},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-119283/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
