Horizon Alert
Summary of the vulnerability and why it matters
This vulnerability in the LibJWT library allows an attacker to forge valid security tokens without needing any secret keys. It happens when an RSA key is accepted without a specified algorithm, causing the verification to fail improperly. This is a serious concern for applications that load RSA keys from external sources and then rely on the token's header to determine the verification method.
- Bypasses authentication.
- Affects applications verifying tokens.
- Can be exploited remotely.
Attack Path
How an attacker could exploit the issue
An attacker could forge a valid JSON Web Token (JWT) by exploiting an algorithm confusion vulnerability in LibJWT. This attack targets applications that improperly handle RSA keys when verifying tokens signed with symmetric algorithms like HS256. By sending a specially crafted JWT, an attacker can bypass authentication without needing any secret or private keys.
- No prior authentication needed.
- Targets verification logic.
- RSA key JWKS without alg.
Live Threat
Current exploitation, exposure, and threat context
This vulnerability allows attackers to forge JWTs without knowing any secrets by exploiting an algorithm confusion when RSA keys are used for HS256/HS384/HS512 token verification. It impacts applications that accept JWK keys without an 'alg' parameter and then use the header's 'alg' for verification, a common practice. While the fix is available, the potential for widespread exploitation in authentication systems makes it a significant concern.
- No public exploits observed.
- KEV listing is not present.
- Fix is available.
Priority actions
Operational Fix
Recommended remediation, mitigation, and detection steps
Prioritize patching LibJWT to version 3.3.3 or later for applications that use RSA JWKs with omitted `alg` parameters for token verification. If immediate patching is not feasible, implement strict validation of the `alg` parameter within JWT headers to prevent algorithm confusion.
- Update libjwt to 3.3.3.
- Validate JWT header `alg` parameter.
- Monitor for forged tokens.