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.
Published: 2026-07-17
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

joserfc, a Python library for JOSE, was missing validation for the HMAC key used during token verification. An attacker can supply an empty string or None as the signing key, allowing the library to verify HMAC‑signed tokens that were forged. The JWT can be accepted without a valid signature, giving attackers the ability to impersonate any user or obtain unauthorized access categorized under), CWE‑287 (Improper Authentication), and CWE‑326 (Insufficient Key Size).

Affected Systems

The vulnerability affects all installations of the authlib:joserfc library prior to version 1.6.8. Systems that import joserfc for decoding and use older releases are at risk. Any Python application that relies on this library for authentication or authorization could be compromised if the vulnerable version is in use.

Risk and Exploitability

The CVSS score of 8.7 classifies this flaw as high severity, indicating a substantial impact when exploited. The EPSS score is less than 1%, suggesting low current exploitation probability, and it is not listed in CISA’s KEV catalog. It is inferred from the description that attackers can achieve authentication bypass by supplying an empty or None key when calling joserfc.jwt.decode. The likely attack vector is straightforward: an attacker crafts a JWT with a valid header and payload, provides a None or empty key to the library, and the application will accept the token as authentic. Because the flaw allows forging of tokens without needing to know the real key, the risk is significant for any service that trusts joserfc for authentication.

Generated by OpenCVE AI on July 30, 2026 at 23:45 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade your installed joserfc package to version 1.6.8 or later to apply the vendor‑provided fix.
  • If an upgrade cannot be performed immediately, implement a pre‑validation step that ensures HMAC keys are non‑empty and meet the minimum key length before passing them to joserfc.jwt.decode.
  • Review and harden authentication logic in your codebase, ensuring that only cryptographically strong, non‑empty keys are used for JWT verification, and monitor authentication logs for suspicious token usage patterns.

Generated by OpenCVE AI on July 30, 2026 at 23:45 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-gg9x-qcx2-xmrh joserfc: HS256/HS384/HS512 verify accepts empty/nil HMAC key (cross-language sibling of CVE-2026-45363)
History

Mon, 20 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 17 Jul 2026 20:45:00 +0000

Type Values Removed Values Added
First Time appeared Authlib
Authlib joserfc
Vendors & Products Authlib
Authlib joserfc

Fri, 17 Jul 2026 19:30:00 +0000

Type Values Removed Values Added
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.
Title joserfc: HS256/HS384/HS512 verify accepts empty/nil HMAC key (cross-language sibling of CVE-2026-45363)
Weaknesses CWE-1391
CWE-287
CWE-326
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-20T14:58:41.701Z

Reserved: 2026-06-01T22:03:19.640Z

Link: CVE-2026-49852

cve-icon Vulnrichment

Updated: 2026-07-20T14:58:04.716Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T00:00:06Z

Weaknesses