CVE-2016-10555: Jwt simple Forgeable Public/Private Tokens Vulnerability

CRITICAL
Advisory Identifier: GHSA-vgrx-w6rg-8fqf
CWE-20
Published
Advisory Summary

CVE-2016-10555 is a CRITICAL forgeable public/private tokens vulnerability (CWE-20: Improper Input Validation) affecting Jwt simple libraries in the npm ecosystem. The issue involves forgeable public/private tokens in jwt-simple. Remediation is available by upgrading affected packages to version 0.3.1.

CVE-2016-10555 at a Glance

CVE Identifier CVE-2016-10555
GHSA Identifier GHSA-vgrx-w6rg-8fqf
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-20: Improper Input Validation
Affected Product Jwt simple
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2016-10555

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.3.1
npm install jwt-simple@0.3.1
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 CVE-2016-10555, 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.3.1), 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-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 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

Affected versions of the `jwt-simple` package allow users to select what algorithm the server will use to verify a provided JWT. A malicious actor can use this behaviour to arbitrarily modify the contents of a JWT while still passing verification. For the common use case of the JWT, the end result is a complete authentication bypass with minimal effort. ## Recommendation Update to version 0.3.1 or later. Additionally, be sure to always specify an algorithm in calls to `.decode()`.

CVE-2016-10555 Affected Jwt simple Versions

1 component(s)
Fixed Versions:
0.3.1
Product / Package Ecosystem Affected Versions Fixed Version
jwt-simple
npm
< 0.3.1
0.3.1

References

Frequently Asked Questions

What is CVE-2016-10555?
CVE-2016-10555 is a security vulnerability in Jwt simple involving Forgeable Public/Private Tokens in jwt-simple under CWE-20: Improper Input Validation.
Which Jwt simple versions are affected?
Affected versions include releases prior to 0.3.1 across affected packages: jwt-simple.
What version fixes CVE-2016-10555?
Upgrading to 0.3.1 (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.3.1. Upgrade your dependency to 0.3.1 or later.
What CWE is associated with CVE-2016-10555?
CVE-2016-10555 is classified under CWE-20: Improper Input Validation (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.).
How can I check npm dependencies for CVE-2016-10555?
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-vgrx-w6rg-8fqf",
  "modified" : "2020-08-31T18:10:20Z",
  "published" : "2018-11-06T23:12:07Z",
  "aliases" : [ "CVE-2016-10555" ],
  "summary" : "Forgeable Public/Private Tokens in jwt-simple",
  "details" : "Affected versions of the `jwt-simple` package allow users to select what algorithm the server will use to verify a provided JWT. A malicious actor can use this behaviour to arbitrarily modify the contents of a JWT while still passing verification. For the common use case of the JWT, the end result is a complete authentication bypass with minimal effort.\n\n\n\n## Recommendation\n\nUpdate to version 0.3.1 or later.\n\nAdditionally, be sure to always specify an algorithm in calls to `.decode()`.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "jwt-simple"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-10555"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hokaccha/node-jwt-simple/pull/14"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hokaccha/node-jwt-simple/pull/16"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hokaccha/node-jwt-simple/commit/957957cfa44474049b4603b293569588ee9ffd97"
  }, {
    "type" : "WEB",
    "url" : "https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/87"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:57:45Z",
    "nvd_published_at" : null
  }
}