CVE-2026-102946
Empty signatures array in JWS General JSON bypasses verification.
- CVSS 9.1
- CWE-290
- Authentication, Authorization, and Session Management
- Remote
joserfc is a Python library that provides an implementation of several JSON Object Signing and Encryption (JOSE) standards. Prior to 1.7.4, joserfc.jws.deserialize_json() accepts a JWS General JSON Serialization with an empty signatures array as authenticated. The verify_general_json() loop performs no iterations for the empty array and returns success because no signature check failed, allowing an attacker without a signing key to supply an arbitrary payload that relying applications may treat as authentic. The issue affects the General JSON Serialization path; compact JWS and JWT decoding, Flattened JSON serialization, and JWE JSON processing do not follow this vulnerable path. This issue is fixed in version 1.7.4.
- CWE
- CWE-290
- CVSS base score
- 9.1
- Published
- 2026-10-15
- OWASP
- A08 Software and Data Integrity Failures
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Authentication, Authorization, and Session Management
- Subcategory
- Insecure Authentication Mechanisms
- Accessibility scope
- Remote
- Impact
- Unauthorized Access
- Affected component
- joserfc
- Fixed by upgrading
- Yes
Solution
Upgrade joserfc to version 1.7.4 or later.
Vulnerable code sample
import json
from joserfc.jws import deserialize_json, verify_general_json
from joserfc.errors import DecodeError
def process_jws_general(serialized_jws: str, key) -> dict:
"""
Deserialize a JWS General JSON Serialization and verify its signatures.
Returns the payload as a dict if verification succeeds.
"""
try:
jws_obj = deserialize_json(serialized_jws)
except DecodeError as exc:
raise ValueError("Invalid JWS") from exc
# VULNERABLE: empty signatures array passes verification
for sig in jws_obj["signatures"]:
verify_general_json(sig, key, jws_obj["payload"])
# If loop completes (or never runs) payload is considered authentic
return json.loads(jws_obj["payload"])Patched code sample
import json
from joserfc.jws import deserialize_json, verify_general_json
from joserfc.errors import DecodeError
def process_jws_general(serialized_jws: str, key) -> dict:
"""
Deserialize a JWS General JSON Serialization and verify its signatures.
Returns the payload as a dict if verification succeeds.
"""
try:
jws_obj = deserialize_json(serialized_jws)
except DecodeError as exc:
raise ValueError("Invalid JWS") from exc
# FIX: reject JWS objects with no signatures
signatures = jws_obj.get("signatures", [])
if not signatures:
raise ValueError("JWS must contain at least one signature")
for sig in signatures:
verify_general_json(sig, key, jws_obj["payload"])
return json.loads(jws_obj["payload"])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.
- fix: prevent verify_general_json bypass empty signatures (authlib/joserfc)
src/joserfc/_rfc7515/json.py · verify_general_json
Cite this entry
@misc{vaitp:cve2026102946,
title = {{Empty signatures array in JWS General JSON bypasses verification.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-102946},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-102946/}}
}
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 ::
