Signature Verification Bypass in jwt-simple

jwt-simple Updated 02 Oct 2025

Summary

06/06/2019
HIGH
Yes i
High
Not published

GHSA-8v5f-hp78-jgxq: Signature Verification Bypass in jwt-simple. Affects jwt-simple versions < 0.5.3. Fixed in 0.5.3. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The jwt-simple package is an npm package used for decoding and verifying JSON Web Tokens (JWTs). It provides a simple and straightforward way to handle JWTs in Node.js applications. However, versions prior to 0.5.3 are vulnerable to a Signature Verification Bypass.

Vulnerability Detail

The vulnerability in jwt-simple arises when no algorithm is specified in the decode() function. In such cases, the package uses the algorithm specified in the JWT to decode tokens. This allows an attacker to create a HS256 (symmetric algorithm) JWT with the server's public key as the secret. The package will then mistakenly verify it as HS256 instead of RS256 (asymmetric algorithm). This bypasses the signature verification process and allows the attacker to impersonate a valid user or perform unauthorized actions.

How To Fix

Minimum fixed version

0.5.3

This is the first release that contains the fix.

npm install jwt-simple@0.5.3

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

Workaround

If upgrading to the latest version is not feasible, a temporary workaround is to explicitly specify the algorithm (e.g., RS256) when calling the decode() function. This ensures that the correct algorithm is used for signature verification.

Conclusion

The jwt-simple package prior to version 0.5.3 is vulnerable to a Signature Verification Bypass. It is crucial to upgrade to the latest version or apply the recommended workaround to mitigate the risk of unauthorized access or impersonation. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for jwt-simple →

Share this vulnerability

FAQ

This vulnerability allows an attacker to bypass signature verification in the jwt-simple package, potentially leading to unauthorized access or impersonation of valid users.

Versions prior to 0.5.3 of the jwt-simple package are affected by this vulnerability.

Yes, upgrading to version 0.5.3 or later of the jwt-simple package fixes this vulnerability.

Yes, a temporary workaround is to explicitly specify the algorithm (e.g., RS256) when calling the decode() function.

You can find more information about this vulnerability in the advisory published by the GitHub Security Advisory Database.

Related vulnerabilities

Recent vulnerabilities recorded for jwt-simple.

How To Fix

Minimum fixed version

0.5.3

This is the first release that contains the fix.

npm install jwt-simple@0.5.3

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