Junglewise Threat Intelligence

CVE-2015-9235: Auth0 jsonwebtoken verification bypass

CVE-2015-9235 · Severity: info · Published 2018-10-09

Technologies: jsonwebtoken (npm). Vendors: npm, Auth0.

Executive brief

jsonwebtoken is a widely-used Node.js library for creating and verifying JSON Web Tokens (JWTs), which are used to securely transmit identity and authorization information in web applications. A verification bypass vulnerability allows attackers to forge valid tokens by exploiting weak algorithm validation, potentially leading to unauthorized access to user accounts and data.

Technical details

The vulnerability stems from CWE-20 (improper input validation) in the JWT verification logic. When verifying a token expected to be signed with an asymmetric algorithm (RS*/ES* family), an attacker can instead submit a token signed with a symmetric algorithm (HS* family), which uses a shared secret. This occurs because the verification function accepts the same parameter (secretOrPublicKey) for both algorithm types without properly constraining the allowed algorithms. An attacker who can arbitrarily specify the JWT algorithm can bypass verification and forge authentication tokens without access to the private key. The fix, released in version 4.2.2, introduces an explicit `algorithms` parameter that restricts accepted algorithms based on the key type and prevents cross-algorithm attacks.

Affected products

  • Auth0 jsonwebtoken 4.2.1 and earlier

Timeline

  • 2015-02-25: disclosed: Vulnerability disclosed in blog post and JWT alg=none article
  • 2015: patched: Fix released in version 4.2.2
  • 2018-10-09: advisory

References

Related threats