CVE-2016-1000223: Jws Forgeable Public/Private Tokens Vulnerability
HIGHCVE-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
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).
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.
npm install jws@3.0.0
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
CVE-2016-1000223 Affected Jws Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jws
|
npm |
< 3.0.0
|
3.0.0
|
References
Frequently Asked Questions
What is CVE-2016-1000223?
Which Jws versions are affected?
What version fixes CVE-2016-1000223?
Is jws affected?
What is the CVSS score of CVE-2016-1000223?
What CWE is associated with CVE-2016-1000223?
How can I check npm dependencies for CVE-2016-1000223?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}