jsonwebtoken vulnerable to signature validation bypass due to insecure default algorithm in jwt.verify()GHSA-qwph-4952-7xr6
MEDIUMFix: auth0/node-jsonwebtoken@e1fa9dcGHSA-qwph-4952-7xr6 is a medium-severity (CVSS 6.4) Improper Authentication vulnerability in jsonwebtoken. A fix is available for jsonwebtoken — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-qwph-4952-7xr6.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
jsonwebtokennpmDescription
Overview
In versions <=8.5.1 of jsonwebtoken library, lack of algorithm definition and a falsy secret or key in the jwt.verify() function can lead to signature validation bypass due to defaulting to the none algorithm for signature verification.
Am I affected?
You will be affected if all the following are true in the jwt.verify() function:
- a token with no signature is received
- no algorithms are specified
- a falsy (e.g. null, false, undefined) secret or key is passed
How do I fix it?
Update to version 9.0.0 which removes the default support for the none algorithm in the jwt.verify() method.
Will the fix impact my users?
There will be no impact, if you update to version 9.0.0 and you don’t need to allow for the none algorithm. If you need 'none' algorithm, you have to explicitly specify that in jwt.verify() options.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | jsonwebtoken | all versions | 9.0.0npm install jsonwebtoken@9.0.0 |
Affected Products
jsonwebtokenauth0Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for jsonwebtoken, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update jsonwebtoken to 9.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-qwph-4952-7xr6 is resolved across your whole dependency graph.
Workarounds
Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| RHODF-4.13-RHEL-9 | odf4/mcg-core-rhel9:v4.13.0-41 | RHSA-2023:3742 |
Frequently Asked Questions
Is GHSA-qwph-4952-7xr6 in your dependencies?
Find it across npm, including transitive dependencies.