CVE-2026-49852
Received Received - Intake

HMAC Signature Bypass in joserfc Library

Vulnerability report for CVE-2026-49852, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-17

Last updated on: 2026-07-17

Assigner: GitHub, Inc.

Description

joserfc is a Python library that provides an implementation of several JSON Object Signing and Encryption (JOSE) standards. Prior to 1.6.8, joserfc.jwt.decode accepts attacker-forged HMAC-signed tokens when the caller-supplied verification key is the empty string or None, because HMACAlgorithm.sign and HMACAlgorithm.verify in src/joserfc/_rfc7518/jws_algs.py pass the output of OctKey.get_op_key(...) to hmac.new(...) and OctKey.import_key in src/joserfc/_rfc7518/oct_key.py only emits a SecurityWarning for keys shorter than 14 bytes without rejecting zero-length input. This issue is fixed in version 1.6.8.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-17
Last Modified
2026-07-17
Generated
2026-07-18
AI Q&A
2026-07-17
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
authlib joserfc to 1.6.8 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-1391 The product uses weak credentials (such as a default key or hard-coded password) that can be calculated, derived, reused, or guessed by an attacker.
CWE-326 The product stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required.
CWE-287 When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

joserfc is a Python library for JOSE standards. Prior to version 1.6.8, it incorrectly accepted HMAC-signed tokens with empty or None verification keys. This allowed attackers to forge tokens without knowing the actual secret key, bypassing authentication. The issue occurred because the library did not reject empty keys during HMAC operations, only issuing warnings for short keys.

Detection Guidance

Check if your system uses joserfc versions 1.6.7 or earlier. Run: pip show joserfc. If installed, verify the version. Inspect applications using JWT with HS256, HS384, or HS512 algorithms for empty or null HMAC keys in configuration or environment variables.

Impact Analysis

If you use joserfc versions 1.6.7 or earlier, an attacker could forge JWT tokens with empty keys, gaining unauthorized access to systems relying on this library for authentication. This could lead to data breaches, privilege escalation, or impersonation of users. The impact is severe if your application uses HS256, HS384, or HS512 algorithms with misconfigured keys.

Compliance Impact

This vulnerability could lead to unauthorized access to sensitive data, violating GDPR's data protection principles and HIPAA's security requirements. Non-compliance may result in legal penalties, fines, or reputational damage due to breaches of confidentiality and integrity of personal health or user data.

Mitigation Strategies

Upgrade joserfc to version 1.6.8 or later immediately. Update all JWT verification code to explicitly reject empty or null HMAC keys. Review environment variables and configuration files for empty secret values.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-49852. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart