GHSA-8v5f-hp78-jgxq: Jwt simple Signature Verification Bypass Vulnerability
HIGHGHSA-8v5f-hp78-jgxq is a HIGH signature verification bypass vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Jwt simple libraries in the npm ecosystem. The issue involves signature verification bypass in jwt-simple. Remediation is available by upgrading affected packages to version 0.5.3.
GHSA-8v5f-hp78-jgxq at a Glance
How to Fix GHSA-8v5f-hp78-jgxq
To remediate this vulnerability, upgrade all affected Jwt simple 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 jwt-simple@0.5.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls jwt-simple
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-8v5f-hp78-jgxq, inspect your project dependencies using npm:
npm ls jwt-simple
Analyze the terminal output to locate any version of Jwt simple in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.5.3), your application is affected.
Note: The npm ls jwt-simple 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-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In Jwt simple, 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
GHSA-8v5f-hp78-jgxq Affected Jwt simple Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jwt-simple
|
npm |
< 0.5.3
|
0.5.3
|
References
Frequently Asked Questions
What is GHSA-8v5f-hp78-jgxq?
Which Jwt simple versions are affected?
What version fixes GHSA-8v5f-hp78-jgxq?
Is jwt-simple affected?
What CWE is associated with GHSA-8v5f-hp78-jgxq?
How can I check npm dependencies for GHSA-8v5f-hp78-jgxq?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8v5f-hp78-jgxq",
"modified" : "2020-08-31T18:37:26Z",
"published" : "2019-06-06T15:30:33Z",
"aliases" : [ ],
"summary" : "Signature Verification Bypass in jwt-simple",
"details" : "Versions of `jwt-simple` prior to 0.5.3 are vulnerable to Signature Verification Bypass. If no algorithm is specified in the `decode()` function, the packages uses the algorithm in the JWT to decode tokens. This allows an attacker to create a HS256 (symmetric algorithm) JWT with the server's public key as secret, and the package will verify it as HS256 instead of RS256 (asymmetric algorithm).\n\n\n## Recommendation\n\nUpgrade to version 0.5.3 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "jwt-simple"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.5.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/hokaccha/node-jwt-simple/commit/ead36e1d687645da9c3be8befdaaef622ea33106"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/831"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-347" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2019-06-06T09:42:36Z",
"nvd_published_at" : null
}
}