Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS1xd3BoLTQ5NTItN3hyNs4AAwgg

jsonwebtoken vulnerable to signature validation bypass due to insecure default algorithm in jwt.verify()

Overview

In versions <=8.5.1 of jsonwebtoken library, lack of algorithm definition and a falsy secret or key in the jwt.verify() function can lead to signature validation bypass due to defaulting to the none algorithm for signature verification.

Am I affected?

You will be affected if all the following are true in the jwt.verify() function:

How do I fix it?

Update to version 9.0.0 which removes the default support for the none algorithm in the jwt.verify() method.

Will the fix impact my users?

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.

Permalink: https://github.com/advisories/GHSA-qwph-4952-7xr6
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1xd3BoLTQ5NTItN3hyNs4AAwgg
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: over 1 year ago
Updated: 9 months ago


CVSS Score: 6.4
CVSS vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L

Identifiers: GHSA-qwph-4952-7xr6, CVE-2022-23540
References: Repository: https://github.com/auth0/node-jsonwebtoken
Blast Radius: 37.5

Affected Packages

npm:jsonwebtoken
Dependent packages: 21,931
Dependent repositories: 718,942
Downloads: 64,390,339 last month
Affected Version Ranges: < 9.0.0
Fixed in: 9.0.0
All affected versions: 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.4.1, 1.0.0, 1.0.2, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.3.0, 2.0.0, 3.0.0, 3.1.0, 3.1.1, 3.2.0, 3.2.1, 3.2.2, 4.0.0, 4.1.0, 4.2.0, 4.2.1, 4.2.2, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.1.0, 5.2.0, 5.3.1, 5.4.0, 5.4.1, 5.5.0, 5.5.1, 5.5.2, 5.5.3, 5.5.4, 5.6.0, 5.6.2, 5.7.0, 6.0.0, 6.0.1, 6.1.0, 6.1.1, 6.1.2, 6.2.0, 7.0.0, 7.0.1, 7.1.0, 7.1.1, 7.1.3, 7.1.5, 7.1.6, 7.1.7, 7.1.8, 7.1.9, 7.1.10, 7.2.0, 7.2.1, 7.3.0, 7.4.0, 7.4.1, 7.4.2, 7.4.3, 8.0.0, 8.0.1, 8.1.0, 8.1.1, 8.2.0, 8.2.1, 8.2.2, 8.3.0, 8.4.0, 8.5.0, 8.5.1
All unaffected versions: 9.0.0, 9.0.1, 9.0.2