CVE-2023-26136: tough-cookie Prototype Pollution vulnerability
6.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.89439%
CWE
Published
7/1/2023
Updated
6/21/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| tough-cookie | npm | < 4.1.3 | 4.1.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from using object literals ({}) instead of Object.create(null) for the cookie store index (idx). When operating in rejectPublicSuffixes=false mode, attackers could set cookies with proto in domain/path fields, polluting the Object prototype. The commit 12d4747 explicitly replaces all {} initializations in memstore.js with Object.create(null) to prevent prototype inheritance, confirming these functions' involvement. The added test case in cookie_jar_test.js demonstrates the exploit scenario targeting these object initialization patterns.