CVE-2016-1000223: Jws Forgeable Public/Private Tokens Vulnerability

HIGH
Advisory Identifier: GHSA-gjcw-v447-2w7q
CVSS 8.7
Published
Advisory Summary

CVE-2016-1000223 is a HIGH (CVSS 8.7) forgeable public/private tokens vulnerability (General Security Weakness) affecting Jws libraries in the npm ecosystem. The issue involves forgeable public/private tokens in jws. Remediation is available by upgrading affected packages to version 3.0.0.

CVE-2016-1000223 at a Glance

CVE Identifier CVE-2016-1000223
GHSA Identifier GHSA-gjcw-v447-2w7q
Severity HIGH
CVSS v3.1 Base Score 8.7
CWE Classification General Security Weakness
Affected Product Jws
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2016-1000223

To remediate this vulnerability, upgrade all affected Jws dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

jws fixed: 3.0.0
npm install jws@3.0.0
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 jws

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2016-1000223, inspect your project dependencies using npm:

npm ls jws

Analyze the terminal output to locate any version of Jws in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.0), your application is affected.

Note: The npm ls jws 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 General Security Weakness. In Jws, 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 `jws` 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 as a bearer token, the end result is a complete authentication bypass with minimal effort. ## Recommendation Update to version 3.0.0 or later.

CVE-2016-1000223 Affected Jws Versions

1 component(s)
Fixed Versions:
3.0.0
Product / Package Ecosystem Affected Versions Fixed Version
jws
npm
< 3.0.0
3.0.0

References

Frequently Asked Questions

What is CVE-2016-1000223?
CVE-2016-1000223 is a security vulnerability in Jws involving Forgeable Public/Private Tokens in jws under General Security Weakness.
Which Jws versions are affected?
Affected versions include releases prior to 3.0.0 across affected packages: jws.
What version fixes CVE-2016-1000223?
Upgrading to 3.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jws affected?
Yes, jws is affected in releases prior to 3.0.0. Upgrade your dependency to 3.0.0 or later.
What is the CVSS score of CVE-2016-1000223?
CVE-2016-1000223 has a CVSS v3.1 base score of 8.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2016-1000223?
CVE-2016-1000223 is classified under General Security Weakness.
How can I check npm dependencies for CVE-2016-1000223?
Run the dependency tree command: 'npm ls jws'. 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-gjcw-v447-2w7q",
  "modified" : "2021-09-23T21:25:33Z",
  "published" : "2020-09-01T15:23:18Z",
  "aliases" : [ "CVE-2016-1000223" ],
  "summary" : "Forgeable Public/Private Tokens in jws",
  "details" : "Affected versions of the `jws` 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 as a bearer token, the end result is a complete authentication bypass with minimal effort.\n\n\n\n\n## Recommendation\n\nUpdate to version 3.0.0 or later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "jws"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-1000223"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/brianloveswords/node-jws/commit/585d0e1e97b6747c10cf5b7689ccc5618a89b299#diff-4ac32a78649ca5bdd8e0ba38b7006a1e"
  }, {
    "type" : "WEB",
    "url" : "https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/brianloveswords/node-jws"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/npm:jws:20160726"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/88"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T18:10:22Z",
    "nvd_published_at" : null
  }
}