Ecosyste.ms: Advisories

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

Security Advisories: GSA_kwCzR0hTQS0yN2gyLWh2cHItcDc0cc4AAwge

jsonwebtoken has insecure input validation in jwt.verify function

Overview

For versions <=8.5.1 of jsonwebtoken library, if a malicious actor has the ability to modify the key retrieval parameter (referring to the secretOrPublicKey argument from the readme link) of the jwt.verify() function, they can gain remote code execution (RCE).

Am I affected?

This security issue is a concern when the jsonwebtoken library is used in an insecure way. Users are affected only if they allow untrusted entities to modify the key retrieval parameter of the jwt.verify() on a host that you control. In this scenario, if all the prerequisites are met, the issue may be exploitable. The source of this risk in this scenario would be in the calling code, and not in the library itself.

How do I fix it?

Users of jsonwebtoken 8.5.1 and earlier are encouraged to update to the latest version, 9.0.0, which presents safer code and important security checks that fixes this security flaw and others and prevents misuse of the package.

Permalink: https://github.com/advisories/GHSA-27h2-hvpr-p74q
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS0yN2gyLWh2cHItcDc0cc4AAwge
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: over 1 year ago
Updated: about 1 year ago

Widthdrawn: about 1 year ago

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

Identifiers: GHSA-27h2-hvpr-p74q, CVE-2022-23529
References: Repository: https://github.com/auth0/node-jsonwebtoken
Blast Radius: 44.5

Affected Packages

npm:jsonwebtoken
Dependent packages: 21,931
Dependent repositories: 718,942
Downloads: 63,899,669 last month
Affected Version Ranges: <= 8.5.1
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