CVE-2016-1000232: Tough cookie Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-qhv9-728r-6jqg
CVSS 5.3
CWE-1333
Published
Advisory Summary

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

CVE Identifier CVE-2016-1000232
GHSA Identifier GHSA-qhv9-728r-6jqg
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Tough cookie
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (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.

tough-cookie fixed: 2.3.0
npm install tough-cookie@2.3.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 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

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. ## Recommendation Update to version 2.3.0 or later.

CVE-2016-1000232 Affected Tough cookie Versions

1 component(s)
Fixed Versions:
2.3.0
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?
CVE-2016-1000232 is a security vulnerability in Tough cookie involving ReDoS via long string of semicolons in tough-cookie under CWE-1333: Inefficient Regular Expression Complexity.
Which Tough cookie versions are affected?
Affected versions include releases prior to 2.3.0 across affected packages: tough-cookie.
What version fixes CVE-2016-1000232?
Upgrading to 2.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tough-cookie affected?
Yes, tough-cookie is affected in releases prior to 2.3.0. Upgrade your dependency to 2.3.0 or later.
What is the CVSS score of CVE-2016-1000232?
CVE-2016-1000232 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2016-1000232?
CVE-2016-1000232 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check npm dependencies for CVE-2016-1000232?
Run the dependency tree command: 'npm ls tough-cookie'. 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-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
  }
}