CVE-2015-9235: Jsonwebtoken Verification Bypass Vulnerability
CRITICALCVE-2015-9235 is a CRITICAL verification bypass vulnerability (CWE-20: Improper Input Validation) affecting Jsonwebtoken libraries in the npm ecosystem. The issue involves verification bypass in jsonwebtoken. Remediation is available by upgrading affected packages to version 4.2.2.
CVE-2015-9235 at a Glance
How to Fix CVE-2015-9235
To remediate this vulnerability, upgrade all affected Jsonwebtoken dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install jsonwebtoken@4.2.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls jsonwebtoken
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2015-9235, inspect your project dependencies using npm:
npm ls jsonwebtoken
Analyze the terminal output to locate any version of Jsonwebtoken in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.2.2), your application is affected.
Note: The npm ls jsonwebtoken command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Jsonwebtoken, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2015-9235 Affected Jsonwebtoken Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jsonwebtoken
|
npm |
< 4.2.2
|
4.2.2
|
References
Frequently Asked Questions
What is CVE-2015-9235?
Which Jsonwebtoken versions are affected?
What version fixes CVE-2015-9235?
Is jsonwebtoken affected?
What CWE is associated with CVE-2015-9235?
How can I check npm dependencies for CVE-2015-9235?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c7hr-j4mj-j2w6",
"modified" : "2020-08-31T18:07:57Z",
"published" : "2018-10-09T00:38:30Z",
"aliases" : [ "CVE-2015-9235" ],
"summary" : "Verification Bypass in jsonwebtoken",
"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.\n\n\n\n\n## Recommendation\n\nUpdate to version 4.2.2 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "jsonwebtoken"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.2.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-9235"
}, {
"type" : "WEB",
"url" : "https://github.com/auth0/node-jsonwebtoken/commit/1bb584bc382295eeb7ee8c4452a673a77a68b687"
}, {
"type" : "WEB",
"url" : "https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-c7hr-j4mj-j2w6"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/17"
}, {
"type" : "WEB",
"url" : "https://www.timmclean.net/2015/02/25/jwt-alg-none.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:30:27Z",
"nvd_published_at" : null
}
}