Security Audit

jsonwebtoken Security Audit

jsonwebtoken is a widely used npm package. As of 2026-05-24, there are 4 known vulnerabilities in the OSV database. The latest stable version is 9.0.3. Developers should audit their dependency trees and update to patched versions.

Package Overview

Package
jsonwebtoken
Ecosystem
npm
Latest Version
9.0.3
License
MIT
Description
JSON Web Token implementation (symmetric and asymmetric)
Repository
https://github.com/auth0/node-jsonwebtoken
Homepage
https://github.com/auth0/node-jsonwebtoken#readme

Known Vulnerabilities (4)

ID Severity Score Affected Versions Fixed In Description
CVE-2015-9235 CRITICAL 9.5 0 to 4.2.2 4.2.2 Verification Bypass in jsonwebtoken
CVE-2022-23539 HIGH 7.5 0 to 9.0.0 9.0.0 jsonwebtoken unrestricted key type could lead to legacy keys usage
CVE-2022-23541 MODERATE 5.0 0 to 9.0.0 9.0.0 jsonwebtoken's insecure implementation of key retrieval function could lead to Forgeable Public/Private Tokens from RSA to HMAC
CVE-2022-23540 MODERATE 5.0 0 to 9.0.0 9.0.0 jsonwebtoken vulnerable to signature validation bypass due to insecure default algorithm in jwt.verify()

Security Recommendations

  1. Pin jsonwebtoken to the latest stable version (9.0.3) in your dependency manifest
  2. Enable automated dependency updates with Dependabot or Renovate
  3. Run regular vulnerability scans using npm audit
  4. Review your lock file (.package-lock.json) after every update
  5. Monitor the OSV database and NIST NVD for new advisories

FAQ

Is jsonwebtoken safe to use?
jsonwebtoken is actively maintained and widely used. As of 2026-05-24, there are 4 known vulnerabilities listed in the OSV database. Most have patches available. Keeping your dependencies updated and running regular security audits significantly reduces risk.
What vulnerabilities does jsonwebtoken have?
The OSV database currently lists 4 vulnerabilities for jsonwebtoken. These range in severity and are detailed in the vulnerability table above. Check the linked advisories for full technical details and remediation guidance.
How do I update jsonwebtoken to fix vulnerabilities?
Run npm update jsonwebtoken or npm install jsonwebtoken@latest to get the newest version. Use npm audit to identify vulnerable dependencies in your project. Enable automated updates with Dependabot or Renovate to stay current.

Using AI-Generated Code with jsonwebtoken?

Our vibe coding security audit checks for misconfigurations, exposed secrets and vulnerable dependencies in AI-generated codebases. If your project uses jsonwebtoken, we can verify it is locked to a safe version and properly configured.

Get a Vibe Coding Security Audit

Related Resources