Improper Authentication Affecting jsonwebtoken package, versions <9.0.0


0.0
medium

Snyk CVSS

    Attack Complexity High
    Integrity High

    Threat Intelligence

    EPSS 0.07% (28th percentile)
Expand this section
NVD
7.6 high

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JS-JSONWEBTOKEN-3180022
  • published 22 Dec 2022
  • disclosed 22 Dec 2022
  • credit Unknown

How to fix?

Upgrade jsonwebtoken to version 9.0.0 or higher.

Overview

jsonwebtoken is a JSON Web Token implementation (symmetric and asymmetric)

Affected versions of this package are vulnerable to Improper Authentication such that the 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.

Exploitability

Users are affected only if all of the following conditions are true for the jwt.verify() function:

  1. A token with no signature is received.

  2. No algorithms are specified.

  3. A falsy (e.g., null, false, undefined) secret or key is passed.