Quick answers
- Is CVE-2015-9235 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2015-9235 being exploited in the wild.
- How severe is CVE-2015-9235?
- Informational severity, published 9 October 2018.
- Which products and versions are affected?
- jsonwebtoken (npm) SEMVER:introduced=0,fixed=4.2.2.
- Is there a fix for CVE-2015-9235?
- Yes. jsonwebtoken (npm): upgrade to 4.2.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2015-9235 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2015-9235?
- Check whether you run jsonwebtoken (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- jsonwebtoken (npm): upgrade to 4.2.2 or later
npm install jsonwebtoken@4.2.2
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
Identifiers
- CVE-2015-9235
- GHSA-c7hr-j4mj-j2w6
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