Executive brief
Auth0's jsonwebtoken library is used to verify digital signatures on JSON Web Tokens, which are commonly used for authentication in web applications and APIs. Versions up to 8.5.1 contain a flaw where the library defaults to accepting unsigned tokens when no algorithm is explicitly specified and a weak or missing secret is provided. An attacker could forge valid-looking tokens without a valid signature, allowing account takeover or unauthorized access to protected resources.
Technical details
The vulnerability is a signature validation bypass (CWE-287, CWE-327, CWE-347) affecting jsonwebtoken ≤8.5.1. When jwt.verify() is called with no algorithm specified and a falsy secret (null, false, undefined), the library defaults to accepting the "none" algorithm, which skips cryptographic validation entirely. An attacker can present an unsigned or self-signed token and it will be accepted as valid. The attack requires network access to an application using the vulnerable library and occurs without authentication or user interaction. The vulnerability is fixed in version 9.0.0, which removes default support for the "none" algorithm.
Affected products
- Auth0 jsonwebtoken <=8.5.1
Timeline
- 2022-12-22: disclosed
- 2022-12-22: patched: Version 9.0.0 released