CVE-2016-1000232: ReDoS via long string of semicolons in tough-cookie
5.3
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.75441%
CWE
Published
10/10/2018
Updated
4/11/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
tough-cookie | npm | < 2.3.0 | 2.3.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how cookie attributes were parsed using a regex with \s*;\s* pattern. This regex contains multiple quantifiers with overlapping match possibilities (whitespace before/after semicolons), leading to exponential time complexity when processing long semicolon sequences. The commit patching this vulnerability replaced the regex split with a simple ';' split followed by trim(), eliminating the backtracking vulnerability. The test case added in parsing_test.js with 65535 semicolons specifically validates this fix.