What’s Vulnerable › Vulnerabilities
CVE-2024-47764: cookie accepts cookie name, path, and domain with out of bounds characters
- Severity: medium (CVSS 6.9 v4.0)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.7% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-10-04 · updated 2026-06-17
- Weakness: CWE-74
Description
cookie is a basic HTTP cookie parser and serializer for HTTP servers. The cookie name could be used to set other fields of the cookie, resulting in an unexpected cookie value. A similar escape can be used for path and domain, which could be abused to alter other fields of the cookie. Upgrade to 0.7.0, which updates the validation for name, path, and domain.
Affected products
- Npm Cookie: before 0.7.0 — fixed in 0.7.0
- jshttp cookie: before 0.7.0
How to fix
Upgrade to a fixed version: Npm Cookie 0.7.0. Check the vendor advisory for mitigations.
References
- https://github.com/jshttp/cookie/commit/e10042845354fea83bd8f34af72475eed1dadf5c
- https://github.com/jshttp/cookie/pull/167
- https://github.com/jshttp/cookie/security/advisories/GHSA-pxg6-pf52-xh8x
Get alerted when CVE-2024-47764 or the next vulnerability affects your stack