{"id":"GHSA-pxg6-pf52-xh8x","revision":"c4169d975fc749a8975fe88aff20ad02","records":[{"revision":"c4169d975fc749a8975fe88aff20ad02","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-pxg6-pf52-xh8x","aliases":["CVE-2024-47764"],"title":"cookie accepts cookie name, path, and domain with out of bounds characters","description":"### 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","state":0,"publishedAt":"2024-10-04T20:31:00+00:00","modifiedAt":"2026-09-10T03:50:19.8989714+00:00","affected":[{"ecosystem":"npm","name":"cookie","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.7.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"Publisher rating","vector":null,"score":null,"severity":"LOW"}],"references":["https://github.com/jshttp/cookie/security/advisories/GHSA-pxg6-pf52-xh8x","https://github.com/jshttp/cookie/pull/167","https://github.com/jshttp/cookie/commit/e10042845354fea83bd8f34af72475eed1dadf5c","https://github.com/jshttp/cookie"],"sourceUrl":"https://github.com/advisories/GHSA-pxg6-pf52-xh8x","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-pxg6-pf52-xh8x","identifiers":["GHSA-pxg6-pf52-xh8x","CVE-2024-47764"]},"retained":false,"historicalAffected":[]}],"coverage":[]}