---
title: "GHSA-g7q5-pjjr-gqvp: Regular Expression Denial of Service in tough-cookie"
description: "High severity. Regular Expression Denial of Service in tough-cookie. Affects tough-cookie; fixed in 2.3.3."
url: https://inlinr.com/advisories/GHSA-g7q5-pjjr-gqvp
lang: en
---

[Packages](https://inlinr.com/packages) / [tough-cookie](https://inlinr.com/packages/tough-cookie) / [Security](https://inlinr.com/packages/tough-cookie/security)

High Vulnerability GHSA-g7q5-pjjr-gqvp CVE-2017-15010 Published 24 Jul 2018

# Regular Expression Denial of Service in tough-cookie

Your version 

Affected releases · [tough-cookie](https://inlinr.com/packages/tough-cookie)

- 2.x 2.0.0 – 2.3.2 Fixed in 2.3.3
- 1.x and older 0.9.0 – 1.2.0 No fix, no longer updated

On 2.x, the newest line:

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

Every release on a timeline

6.x 

1. Not affected

6.0.0 – 6.1.0  
4 releases, latest

2.x 

1. Affected

2.0.0 – 2.3.2  
8 releases
2. Fixed

2.3.3 – 2.5.0  
5 releases

1.x 

1. Affected

1.0.0 – 1.2.0  
3 releases

0.x 

1. Affected

0.9.0 – 0.13.0  
19 releases

51 stable releases of tough-cookie, oldest to newest, one row per major.

## What happens

Affected versions of `tough-cookie` are susceptible to a regular expression denial of service.

The amplification on this vulnerability is relatively low - it takes around 2 seconds for the engine to execute on a malicious input which is 50,000 characters in length.

If node was compiled using the `-DHTTP_MAX_HEADER_SIZE` however, the impact of the vulnerability can be significant, as the primary limitation for the vulnerability is the default max HTTP header length in node.

Recommendation

Update to version 2.3.3 or later.

## How it is exploited

Exploitable over the network, with no account and no action from a user.

- **Confidentiality**: none
- **Integrity**: none
- **Availability**: high

CVSS:3.0/​AV:N/​AC:L/​PR:N/​UI:N/​S:U/​C:N/​I:N/​A:H

## References

- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2017-15010 "https://nvd.nist.gov/vuln/detail/CVE-2017-15010")  
nvd.nist.gov/vuln/detail/CVE-2017-15010
- [Issue](https://github.com/salesforce/tough-cookie/issues/92 "https://github.com/salesforce/tough-cookie/issues/92")  
#92
- [Fix commit](https://github.com/salesforce/tough-cookie/commit/f1ed420a6a92ea7a5418df6e39e676556bc0c71d "https://github.com/salesforce/tough-cookie/commit/f1ed420a6a92ea7a5418df6e39e676556bc0c71d")  
f1ed420
- [Reference](https://access.redhat.com/errata/RHSA-2017:2912 "https://access.redhat.com/errata/RHSA-2017:2912")  
access.redhat.com/errata/RHSA-2017:2912
- [Reference](https://access.redhat.com/errata/RHSA-2017:2913 "https://access.redhat.com/errata/RHSA-2017:2913")  
access.redhat.com/errata/RHSA-2017:2913
- [Reference](https://access.redhat.com/errata/RHSA-2018:1263 "https://access.redhat.com/errata/RHSA-2018:1263")  
access.redhat.com/errata/RHSA-2018:1263
- [Reference](https://access.redhat.com/errata/RHSA-2018:1264 "https://access.redhat.com/errata/RHSA-2018:1264")  
access.redhat.com/errata/RHSA-2018:1264
- [GitHub advisory](https://github.com/advisories/GHSA-g7q5-pjjr-gqvp "https://github.com/advisories/GHSA-g7q5-pjjr-gqvp")  
github.com/advisories/GHSA-g7q5-pjjr-gqvp
- [Package](https://github.com/salesforce/tough-cookie "https://github.com/salesforce/tough-cookie")  
github.com/salesforce/tough-cookie
- [Reference](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6VEBDTGNHVM677SLZDEHMWOP3ISMZSFT "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6VEBDTGNHVM677SLZDEHMWOP3ISMZSFT")  
lists.fedoraproject.org/archives/list/package-a…
- [Reference](https://snyk.io/vuln/npm:tough-cookie:20170905 "https://snyk.io/vuln/npm:tough-cookie:20170905")  
snyk.io/vuln/npm:tough-cookie:20170905
- [Reference](https://www.npmjs.com/advisories/525 "https://www.npmjs.com/advisories/525")  
npmjs.com/advisories/525
- [Reference](http://www.securityfocus.com/bid/101185 "http://www.securityfocus.com/bid/101185")  
securityfocus.com/bid/101185

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
