CVE-2016-1000232: Tough cookie Denial of Service Vulnerability
MODERATECVE-2016-1000232 is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Tough cookie libraries in the npm ecosystem. The issue involves redos via long string of semicolons in tough-cookie. Remediation is available by upgrading affected packages to version 2.3.0.
CVE-2016-1000232 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2016-1000232
To remediate this vulnerability, upgrade all affected Tough cookie 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 tough-cookie@2.3.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls tough-cookie
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2016-1000232, inspect your project dependencies using npm:
npm ls tough-cookie
Analyze the terminal output to locate any version of Tough cookie in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.0), your application is affected.
Note: The npm ls tough-cookie 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-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Tough cookie, 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-1000232 Affected Tough cookie Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tough-cookie
|
npm |
< 2.3.0
|
2.3.0
|
References
Frequently Asked Questions
What is CVE-2016-1000232?
Which Tough cookie versions are affected?
What version fixes CVE-2016-1000232?
Is tough-cookie affected?
What is the CVSS score of CVE-2016-1000232?
What CWE is associated with CVE-2016-1000232?
How can I check npm dependencies for CVE-2016-1000232?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qhv9-728r-6jqg",
"modified" : "2021-09-16T19:58:53Z",
"published" : "2018-10-10T18:57:02Z",
"aliases" : [ "CVE-2016-1000232" ],
"summary" : "ReDoS via long string of semicolons in tough-cookie",
"details" : "Affected versions of `tough-cookie` may be vulnerable to regular expression denial of service when long strings of semicolons exist in the `Set-Cookie` header.\n\n\n## Recommendation\n\nUpdate to version 2.3.0 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "tough-cookie"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.3.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-1000232"
}, {
"type" : "WEB",
"url" : "https://github.com/salesforce/tough-cookie/commit/615627206357d997d5e6ff9da158997de05235ae"
}, {
"type" : "WEB",
"url" : "https://github.com/salesforce/tough-cookie/commit/e4fc2e0f9ee1b7a818d68f0ac7ea696f377b1534"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2016:2101"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2017:2912"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/security/cve/cve-2016-1000232"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-qhv9-728r-6jqg"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/salesforce/tough-cookie"
}, {
"type" : "WEB",
"url" : "https://www.ibm.com/blogs/psirt/ibm-security-bulletin-ibm-api-connect-is-affected-by-node-js-tough-cookie-module-vulnerability-to-a-denial-of-service-cve-2016-1000232"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/130"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:52:05Z",
"nvd_published_at" : null
}
}