# CVE-2017-15010: tough-cookie regular expression denial of service

Source: https://junglewise.ai/threats/cve-2017-15010-tough-cookie-regular-expression-denial-of-service  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2018-07-24. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2017-15010 · Severity: low · CVSS 3 · Published 2018-07-24

tough-cookie is a popular Node.js library for parsing and managing HTTP cookies. A maliciously crafted cookie string can cause the parser's regular expression engine to consume excessive CPU time, potentially making Node.js applications unresponsive. This is particularly severe if the application has increased HTTP header size limits.

Technologies: [tough-cookie (npm)](https://junglewise.ai/threats/technologies/tough-cookie). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2017-15010 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2017-15010 being exploited in the wild.

**How severe is CVE-2017-15010?** Low severity, with a CVSS score of 3, published 24 July 2018.

**Which products and versions are affected?** tough-cookie (npm) SEMVER:introduced=0,fixed=2.3.3.

**Is there a fix for CVE-2017-15010?** Yes. tough-cookie (npm): upgrade to 2.3.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2017-15010 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2017-15010?** Check whether you run tough-cookie (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- tough-cookie (npm): upgrade to 2.3.3 or later

  ```sh
  npm install tough-cookie@2.3.3
  ```


## Technical details

The vulnerability is a Regular Expression Denial of Service (ReDoS) in the cookie-parsing regex `/^(([^=;]+))\s*=\s*([^\n\r\0]*)/`. Adversarial input around 50,000 characters in length can cause ~2.5 seconds of matching time due to catastrophic backtracking. The attack is network-reachable and requires no authentication—any HTTP request with a malicious Cookie header can trigger it. An attacker can cause denial of service by exhausting CPU resources on the server. The vulnerability was fixed in version 2.3.3 and later.

## Affected products

- Salesforce tough-cookie before 2.3.3

## Identifiers

- CVE-2017-15010
- GHSA-g7q5-pjjr-gqvp

## Timeline

- 2017-09-05: disclosed
- 2017: patched: Fix available in version 2.3.3
- 2018-07-24: advisory

## References

- [https://github.com/salesforce/tough-cookie/issues/92](https://github.com/salesforce/tough-cookie/issues/92)

## Related threats

- [tough-cookie Prototype Pollution in object initialization](https://junglewise.ai/threats/cve-2023-26136-tough-cookie-prototype-pollution-in-object-initialization)
- [tough-cookie ReDoS via semicolon strings](https://junglewise.ai/threats/cve-2016-1000232-tough-cookie-redos-via-semicolon-strings)
