GHSA-8v5f-hp78-jgxq: Jwt simple Signature Verification Bypass Vulnerability

HIGH
CWE-347
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-8v5f-hp78-jgxq
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
Affected Product Jwt simple
Package Ecosystem npm
Published Date
Last Updated

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.

jwt-simple fixed: 0.5.3
npm install jwt-simple@0.5.3
Verify Direct and Transitive Dependencies

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

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). ## Recommendation Upgrade to version 0.5.3 or later.

GHSA-8v5f-hp78-jgxq Affected Jwt simple Versions

1 component(s)
Fixed Versions:
0.5.3
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?
GHSA-8v5f-hp78-jgxq is a security vulnerability in Jwt simple involving Signature Verification Bypass in jwt-simple under CWE-347: Improper Verification of Cryptographic Signature.
Which Jwt simple versions are affected?
Affected versions include releases prior to 0.5.3 across affected packages: jwt-simple.
What version fixes GHSA-8v5f-hp78-jgxq?
Upgrading to 0.5.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jwt-simple affected?
Yes, jwt-simple is affected in releases prior to 0.5.3. Upgrade your dependency to 0.5.3 or later.
What CWE is associated with GHSA-8v5f-hp78-jgxq?
GHSA-8v5f-hp78-jgxq is classified under CWE-347: Improper Verification of Cryptographic Signature (The product does not verify, or incorrectly verifies, the cryptographic signature for data.).
How can I check npm dependencies for GHSA-8v5f-hp78-jgxq?
Run the dependency tree command: 'npm ls jwt-simple'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}