CVE-2016-1000232: ReDoS in tough-cookie

tough-cookie Updated 02 Oct 2025

Summary

10/10/2018
Yes i
Moderate
5.3

CVE-2016-1000232: ReDoS via long string of semicolons in tough-cookie. Affects tough-cookie versions < 2.3.0. Fixed in 2.3.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The tough-cookie package is an npm module that provides a cookie jar implementation for managing HTTP cookies. It is commonly used in Node.js applications to handle cookie-related operations. The package allows users to parse, serialize, and manipulate cookies in accordance with the HTTP state management mechanism. However, certain versions of tough-cookie are vulnerable to a regular expression denial of service (ReDoS) attack when processing long strings of semicolons in the Set-Cookie header.

Vulnerability Detail

The vulnerability in tough-cookie arises from a lack of proper input validation when handling the Set-Cookie header. An attacker can exploit this by sending a specially crafted HTTP response with a long string of semicolons in the Set-Cookie header. When the vulnerable version of tough-cookie attempts to parse this header, it triggers a regular expression pattern matching operation that is susceptible to ReDoS. This can lead to a denial of service condition, causing excessive CPU usage and potentially impacting the availability of the affected application. The severity of this vulnerability is rated as MODERATE with a CVSS score of 5.3.

How To Fix

Latest published version: 6.0.2 as of 22 Oct 2026

npm install tough-cookie@6.0.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.3.0

This is the first release that contains the fix.

npm install tough-cookie@2.3.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to update to the patched version of tough-cookie to mitigate the risk.

Conclusion

The tough-cookie package is vulnerable to a ReDoS attack when processing long strings of semicolons in the Set-Cookie header. To mitigate this vulnerability, it is crucial to update to version 2.3.0 or later. For further assistance or support in addressing this vulnerability, please contact DevNack.com.

See every vulnerability recorded for tough-cookie →

Share this vulnerability

FAQ

tough-cookie is an npm module that provides a cookie jar implementation for managing HTTP cookies in Node.js applications.

A ReDoS attack is a type of denial of service attack that exploits the exponential time complexity of certain regular expressions. By providing input that triggers excessive backtracking, an attacker can cause the regular expression matching process to consume significant computational resources, leading to a denial of service condition.

The vulnerability in tough-cookie can result in a denial of service condition, causing excessive CPU usage and potentially impacting the availability of the affected application.

To fix this vulnerability, update the tough-cookie package to version 2.3.0 or later.

No, there is no known workaround for this vulnerability. Updating to the patched version is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for tough-cookie.

How To Fix

Latest published version: 6.0.2 as of 22 Oct 2026

npm install tough-cookie@6.0.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.3.0

This is the first release that contains the fix.

npm install tough-cookie@2.3.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback