{"id":"CVE-2024-47764","aliases":["CVE-2024-47764","GHSA-pxg6-pf52-xh8x"],"related":[],"kind":"vulnerability","state":"published","title":"cookie accepts cookie name, path, and domain with out of bounds characters","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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","format":"markdown","source":"ghsa"},{"lang":"es","text":"cookie es un analizador y serializador de cookies HTTP básico para servidores HTTP. El nombre de la cookie se puede utilizar para configurar otros campos de la cookie, lo que genera un valor de cookie inesperado. Se puede utilizar un escape similar para path y domain, que se puede utilizar de forma abusiva para modificar otros campos de la cookie. Actualice a la versión 0.7.0, que actualiza la validación de name, path y domain.","source":"nvd"}],"published":"2024-10-04T19:09:46.640Z","modified":"2026-09-10T03:50:19.898Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","score":6.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","score":6.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"rating","rating":"LOW"}],"cwes":["CWE-74"],"affected":[{"ranges":[{"version":"< 0.7.0","status":"affected"}],"vendor":"jshttp","product":"cookie","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.7.0"}],"ecosystem":"npm","package":"cookie","purl":"pkg:npm/cookie","source":"ghsa"}],"references":[{"url":"https://github.com/jshttp/cookie/security/advisories/GHSA-pxg6-pf52-xh8x","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/jshttp/cookie/pull/167","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/jshttp/cookie/commit/e10042845354fea83bd8f34af72475eed1dadf5c","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/jshttp/cookie","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-10-04T20:14:41.037Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-47764","url":"https://www.cve.org/CVERecord?id=CVE-2024-47764","licence":"CVE Terms of Use","modified":"2024-10-04T20:14:56.059Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-pxg6-pf52-xh8x","url":"https://github.com/advisories/GHSA-pxg6-pf52-xh8x","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:19.898Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-47764","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47764","licence":"Public domain","modified":"2026-06-17T07:57:42.753Z"}],"updatedAt":"2026-11-25T22:58:46.040Z","epss":{"score":0.00744,"percentile":0.55973,"date":"2026-12-01T12:00:22.000Z"}}