node-jsonwebtoken: Improper Verification of Cryptographic Signature
CVE-2022-23540 is a high-severity improper verification of cryptographic signature vulnerability in node-jsonwebtoken from Auth0, with a CVSS 3.1 base score of 7.6 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, without any action from a user. Affected node-jsonwebtoken versions: <= 8.5.1. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.57% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of node-jsonwebtoken you run against the affected versions below, and install the vendor's latest release.
- Read the advisory on github.com for workarounds and exact fixed builds.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Auth0 | node-jsonwebtoken | <= 8.5.1 | Not stated |
| Auth0 | Jsonwebtoken | 8.5.1 and earlier | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- LowSome restricted data can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- LowPerformance or availability is reduced.
Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:L. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 6.4 | Medium | CNA (github.com) |
| CVSS 3.1 | 7.6 | High | NVD |
Official description
In versions `<=8.5.1` of `jsonwebtoken` library, lack of algorithm definition in the `jwt.verify()` function can lead to signature validation bypass due to defaulting to the `none` algorithm for signature verification. Users are affected if you do not specify algorithms in the `jwt.verify()` function. This issue has been fixed, please update to version 9.0.0 which removes the default support for the none algorithm in the `jwt.verify()` method. There will be no impact, if you update to version 9.0.0 and you don’t need to allow for the `none` algorithm. If you need 'none' algorithm, you have to explicitly specify that in `jwt.verify()` options.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Verification of Cryptographic Signature
The product does not verify, or incorrectly verifies, the cryptographic signature for data.
More Improper Verification of Cryptographic Signature vulnerabilities (CWE-347)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- github.com/auth0/node-jsonwebtoken/security/advisories/GHSA-qwph-4952-7xr6Third Party Advisory
Patches and release notes
Other references
Other vulnerabilities in node-jsonwebtoken
- 8.1 High severity
Recent Improper Verification of Cryptographic Signature vulnerabilities
- 7.8 High severity
- 7.8 High severity
- 9.8 Critical severity
- 7.5 High severity
- 8.1 High severity
- 7.8 High severity
Spotted an error? Tell us.