Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAnalyze target JWKS endpoint
-
DeliveryFind RSA key without 'alg' parameter
-
ExploitCraft JWT with HS256 algorithm
-
ExecutionSign with empty HMAC key
-
PersistSubmit forged JWT
-
ImpactBypass authentication
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Approved algorithm selection
|
| Exploitation Conditions | The application must use LibJWT 3.0.0-3.3.2 with OpenSSL backend AND load RSA keys from JWKS where the 'alg' parameter is omitted AND select the verification algorithm from the JWT header rather than enforcing it based on the key type. This commonly occurs in applications using 'kid' (key ID) lookup callbacks that dynamically select keys from JWKS. The vulnerability does not affect applications that explicitly specify algorithms when loading keys or that use symmetric HMAC keys exclusively. |
| Impact | This is a critical authentication bypass with high real-world risk. The CVSS 4.0 score of 9.1 reflects network-based, unauthenticated exploitation (AV:N/PR:N) with high confidentiality and integrity impact. SSVC framework confirms publicly available exploit code exists, though exploitation is not fully automatable (requires targeting specific applications). The vulnerability affects a fundamental security control (JWT verification) in a widely-used library. Unlike many high-CVSS issues, this represents an immediate threat to applications using dynamic JWKS key loading with algorithm selection from JWT headers - a common pattern in multi-tenant systems and API gateways. No EPSS score or CISA KEV listing provided, but the existence of public POC code and the authentication bypass nature make this a priority for immediate patching. |
| Exploit ScenarioDerived | An attacker crafts a JWT with an HS256 algorithm header but signs it with an empty string. When the application loads an RSA public key from JWKS (missing the 'alg' field) and uses it to verify the HMAC signature, LibJWT accepts the forged token as valid. This grants the attacker authenticated access without knowing any secrets. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 15, 2026
Algorithm confusion in LibJWT 3.0.0 through 3.3.2 allows authentication bypass when RSA JWKs lack the 'alg' parameter. The OpenSSL backend incorrectly processes HMAC verification with a zero-length key when an RSA key without 'alg' is used to verify HS256/HS384/HS512 tokens, enabling attackers to forge valid JWTs without knowing any secret. Public exploit code exists (SSVC), making this a critical authentication bypass affecting applications using JWKS-based key lookup.
RemediationAI
Vendor-released patch: upgrade to LibJWT version 3.3.3 or later, which properly validates algorithm compatibility between keys and tokens. Full details available in GitHub Security Advisory GHSA-q843-6q5f-w55g at https://github.com/benmcollins/libjwt/security/advisories/GHSA-q843-6q5f-w55g. For applications that cannot immediately upgrade, implement application-level validation to ensure RSA keys are only used with RS256/RS384/RS512 algorithms and HMAC keys only with HS256/HS384/HS512. Explicitly set the 'alg' parameter in all JWKs to prevent algorithm confusion. As a defense-in-depth measure, consider pinning expected algorithms per key ID rather than accepting the algorithm from untrusted JWT headers.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
LibJWT is a C library for creating and verifying JSON Web Tokens (JWTs). The vulnerability stems from improper cryptographic algorithm selection (CWE-327) when loading RSA keys from JSON Web Key Sets (JWKS). When an RSA JWK omits the optional 'alg' parameter - which is valid per RFC 7517 and common in production deployments - and the application determines the verification algorithm from the JWT header, LibJWT's OpenSSL backend fails to reject the algorithm mismatch between RSA keys and HMAC algorithms (HS256/HS384/HS512). This results in HMAC verification running with an empty key, always producing the same signature regardless of input.
Know when Libjwt gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
3DescriptionCVE.org
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.
Executive ViewAI
LibJWT versions 3.0.0 through 3.3.2 contain an algorithm confusion vulnerability that allows attackers to forge authentication tokens and bypass JWT validation without knowledge of signing secrets, directly compromising identity verification in applications relying on JWKS-based authentication. Organizations using affected LibJWT versions in production authentication systems face immediate risk of unauthorized access and session hijacking.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
libjwt 1.15.3 uses strcmp (which is not constant time) to verify authentication, which makes it easier to bypass authent
LibJWT versions 3.0.0 through 3.2.x are vulnerable to denial of service through a NULL pointer dereference in RSA-PSS JW
EUVD-2026-30560
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB