CVE-2015-9235: Verification Bypass in jsonwebtoken

jsonwebtoken Updated 02 Oct 2025

Summary

09/10/2018
Yes i
Critical
Not published

CVE-2015-9235: Verification Bypass in jsonwebtoken. Affects jsonwebtoken versions < 4.2.2. Fixed in 4.2.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The 'jsonwebtoken' package is an npm package that provides functionality for creating, signing, and verifying JSON Web Tokens (JWTs). JWTs are used for secure transmission of information between parties. The package is widely used in various applications for authentication and authorization purposes.

Vulnerability Detail

Versions 4.2.1 and earlier of 'jsonwebtoken' are affected by a verification bypass vulnerability. This vulnerability stems from weak validation of the JWT algorithm type, allowing an attacker to specify the algorithm arbitrarily. As a result, an attacker can craft a malicious JWT with a manipulated algorithm, bypassing the verification process and potentially gaining unauthorized access or impersonating other users.

How To Fix

Minimum fixed version

4.2.2

This is the first release that contains the fix.

npm install jsonwebtoken@4.2.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to update to the fixed version of the package to mitigate the risk.

Conclusion

The 'jsonwebtoken' package versions 4.2.1 and earlier are vulnerable to a verification bypass vulnerability. To mitigate the risk, it is crucial to update to version 4.2.2 or later. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for jsonwebtoken →

Share this vulnerability

FAQ

The vulnerability allows an attacker to bypass JWT verification, potentially leading to unauthorized access or impersonation of other users.

Versions 4.2.1 and earlier of 'jsonwebtoken' are affected.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities using package-lock.json.

No, there is no known workaround. Updating to the fixed version is necessary.

Related vulnerabilities

Recent vulnerabilities recorded for jsonwebtoken.

How To Fix

Minimum fixed version

4.2.2

This is the first release that contains the fix.

npm install jsonwebtoken@4.2.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback