Is jsonwebtoken 5.6 vulnerable?

npm · 2 releases from 5.6.0 to 5.6.2 · latest jsonwebtoken is 9.0.3 · checked 2 Nov 2026

Yes: 3 known advisories

Yes. jsonwebtoken 5.6.2, the last 5.6 release, is affected by 3 known security advisories (1 high, 2 medium), including CVE-2022-23539, CVE-2022-23541, CVE-2022-23540. Upgrade to 9.0.0 or later to fix all of them.

Upgrade with:npm install jsonwebtoken@9.0.0

Is your project affected?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Advisories affecting jsonwebtoken 5.6.2

  • MediumCVE-2022-23541GHSA-hjrf-2m68-595922 Dec 2022

    jsonwebtoken's insecure implementation of key retrieval function could lead to Forgeable Public/Private Tokens from RSA to HMAC

    Affected
    <9.0.0
    Fixed in
    9.0.0
  • MediumCVE-2022-23540GHSA-qwph-4952-7xr622 Dec 2022

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

    Affected
    <9.0.0
    Fixed in
    9.0.0
  • HighCVE-2022-23539GHSA-8cf7-32gw-wr3322 Dec 2022

    jsonwebtoken unrestricted key type could lead to legacy keys usage

    Affected
    <9.0.0
    Fixed in
    9.0.0

Which of your client projects are still on jsonwebtoken 5.6?

NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact jsonwebtoken version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.

Other jsonwebtoken versions

Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the npm registry. Refreshed daily.