CriticalGHSA-c7hr-j4mj-j2w6CVE-2015-9235

Verification Bypass in jsonwebtoken

Published 9 Oct 2018 · Updated 10 Sept 2026

Is your project on an affected jsonwebtoken?

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

Look after several JavaScript apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<4.2.2
Fixed in
4.2.2
Update to the fixed version for your release line, for example:npm install jsonwebtoken@4.2.2

Details

Versions 4.2.1 and earlier of jsonwebtoken are affected by a verification bypass vulnerability. This is a result of weak validation of the JWT algorithm type, occuring when an attacker is allowed to arbitrarily specify the JWT algorithm.

Recommendation

Update to version 4.2.2 or later.

Is GHSA-c7hr-j4mj-j2w6 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected jsonwebtoken, and gives you the command that fixes it.

More advisories for jsonwebtoken

  • MediumCVE-2022-23541jsonwebtoken's insecure implementation of key retrieval function could lead to Forgeable Public/Private Tokens from RSA to HMAC · 22 Dec 2022
  • MediumCVE-2022-23540jsonwebtoken vulnerable to signature validation bypass due to insecure default algorithm in jwt.verify() · 22 Dec 2022
  • HighCVE-2022-23539jsonwebtoken unrestricted key type could lead to legacy keys usage · 22 Dec 2022
jsonwebtoken security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.