{"id":"CVE-2024-47764","aliases":["GHSA-pxg6-pf52-xh8x"],"url":"https://o3.security/vulnerability/CVE-2024-47764","summary":"cookie accepts cookie name, path, and domain with out of bounds characters","details":"### Impact\n\nThe cookie name could be used to set other fields of the cookie, resulting in an unexpected cookie value. For example, `serialize(\"userName=<script>alert('XSS3')</script>; Max-Age=2592000; a\", value)` would result in `\"userName=<script>alert('XSS3')</script>; Max-Age=2592000; a=test\"`, setting `userName` cookie to `<script>` and ignoring `value`.\n\nA similar escape can be used for `path` and `domain`, which could be abused to alter other fields of the cookie.\n\n### Patches\n\nUpgrade to 0.7.0, which updates the validation for `name`, `path`, and `domain`.\n\n### Workarounds\n\nAvoid passing untrusted or arbitrary values for these fields, ensure they are set by the application instead of user input.\n\n### References\n\n* https://github.com/jshttp/cookie/pull/167","published":"2024-10-04T19:09:46.640Z","modified":"2026-08-12T03:51:47.707139391Z","cvss":null,"epss":{"score":0.00744,"percentile":0.53009,"asOf":"2026-09-16"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"cookie","fixedVersion":"0.7.0"}],"fix":{"url":"https://github.com/jshttp/cookie/commit/e10042845354fea83bd8f34af72475eed1dadf5c","label":"jshttp/cookie@e100428"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/47xxx/CVE-2024-47764.json"},{"type":"ADVISORY","url":"https://github.com/jshttp/cookie/security/advisories/GHSA-pxg6-pf52-xh8x"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47764"},{"type":"FIX","url":"https://github.com/jshttp/cookie/commit/e10042845354fea83bd8f34af72475eed1dadf5c"},{"type":"FIX","url":"https://github.com/jshttp/cookie/pull/167"},{"type":"PACKAGE","url":"https://github.com/jshttp/cookie"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:47.707139391Z"}}