CVE-2026-44699

LibJWT: Algorithm confusion allows JWT forgery with RSA JWK as empty-key HMAC

Published May 15, 2026 CVSS 4.0 · 9.1 Critical EPSS < 1% KEV · Not listed
Description
LibJWT is a C JSON Web Token Library. From 3.0.0 to 3.3.2, libjwt accepts an RSA JWK that does not contain an alg parameter as the verification key for an HS256/HS384/HS512 token. In the OpenSSL backend, this causes HMAC verification to run with a zero-length key, so an attacker can forge a valid JWT without knowing any secret or RSA private key. This is an algorithm-confusion authentication bypass. It affects applications that load RSA keys from JWKS where alg is omitted, which is valid JWK syntax and common in real deployments, and then choose the verification algorithm from the JWT header, for example in a kid lookup callback. This vulnerability is fixed in 3.3.3.

Analysis

AI-generated

Technical impact

LibJWT, a C JSON Web Token library, incorrectly accepted an RSA JSON Web Key that lacked an "alg" property as a key for HMAC verification of HS256/HS384/HS512 tokens. The OpenSSL backend interprets the missing alg as a zero‑length key, permitting an attacker to create a valid JWT without possessing the secret or RSA private key. This algorithm‑confusion flaw enables authentication bypass and can give attackers full access to any resource that relies on JWT validation for authorization.

Affected Systems

The vulnerability affects Benmcollins libjwt versions 3.0.0 through 3.3.2. Any application that loads RSA keys from a JWKS where the algorithm is omitted and then selects the verification algorithm from the JWT header is impacted. Systems using libjwt in authentication or session handling should scrutinize their implementation for the presence of this flaw.

Risk and Exploitability

The CVSS score of 9.1 indicates a high‑severity authentication bypass. The EPSS score is not available, and the issue is not listed in CISA KEV. An attacker who can supply a forged JWT—typically via network observation or API integration—can exploit this weakness without needing privileged credentials. The likelihood of exploitation is significant in environments where libjwt is used without hard‑coded algorithm checks, and the impact can range from unauthorized user access to full system compromise depending on the application’s security model.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade libjwt to version 3.3.3 or later, where the algorithm confusion bug has been fixed.
  • Validate the "alg" field of incoming JSON Web Keys and reject keys that omit the algorithm when used for HMAC verification.
  • Implement an explicit check that the key type (RSA, EC, etc.) matches the expected signing algorithm (HS*, RS*, ES*, etc.) before verification.
  • Consider disabling automatic algorithm selection based on the JWT header and enforce a fixed algorithm policy aligned with the secret key type.

Generated by OpenCVE AI on May 15, 2026 at 17:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Benmcollins
Benmcollins libjwt
Vendors & Products Benmcollins
Benmcollins libjwt
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description LibJWT is a C JSON Web Token Library. From 3.0.0 to 3.3.2, libjwt accepts an RSA JWK that does not contain an alg parameter as the verification key for an HS256/HS384/HS512 token. In the OpenSSL backend, this causes HMAC verification to run with a zero-length key, so an attacker can forge a valid JWT without knowing any secret or RSA private key. This is an algorithm-confusion authentication bypass. It affects applications that load RSA keys from JWKS where alg is omitted, which is valid JWK syntax and common in real deployments, and then choose the verification algorithm from the JWT header, for example in a kid lookup callback. This vulnerability is fixed in 3.3.3.
Title LibJWT: Algorithm confusion allows JWT forgery with RSA JWK as empty-key HMAC
Weaknesses CWE-327
CWE-347
References
Metrics cvssV4_0

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

Weaknesses
  • CWE-327

    Use of a Broken or Risky Cryptographic Algorithm

  • CWE-347

    Improper Verification of Cryptographic Signature

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
May 15, 2026, 6:04 PM
Reserved
May 7, 2026, 5:07 PM
Status
Deferred
Published
May 15, 2026, 5:16 PM
Modified
Oct 26, 2026, 2:10 PM