CyberSecBulletin
CVE-2022-23540NVD status: Modified

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.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Check which version of node-jsonwebtoken you run against the affected versions below, and install the vendor's latest release.
  2. Read the advisory on github.com for workarounds and exact fixed builds.

Affected products and versions

VendorProductAffected versionsFixed in
Auth0node-jsonwebtoken<= 8.5.1Not stated
Auth0Jsonwebtoken8.5.1 and earlierNot 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 systemScoreSeverityScored by
CVSS 3.16.4MediumCNA (github.com)
CVSS 3.17.6HighNVD

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

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
  3. Record last changed materially (score, affected products, status or references).

References

Other vulnerabilities in node-jsonwebtoken

All node-jsonwebtoken vulnerabilities

Recent Improper Verification of Cryptographic Signature vulnerabilities

Spotted an error? Tell us.