cookie accepts cookie name, path, and domain with out of bounds characters
cve-program · CVE-2024-47764
Publishedcookie 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.
Read the publisher's advisoryeuvd · EUVD-2024-3106
Publishedcookie 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.
Read the publisher's advisorynvd · CVE-2024-47764
Publishedcookie 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.
Read the publisher's advisoryosv · GHSA-pxg6-pf52-xh8x
Published### Impact The 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`. A similar escape can be used for `path` and `domain`, which could be abused to alter other fields of the cookie. ### Patches Upgrade to 0.7.0, which updates the validation for `name`, `path`, and `domain`. ### Workarounds Avoid passing untrusted or arbitrary values for these fields, ensure they are set by the application instead of user input. ### References * https://github.com/jshttp/cookie/pull/167
Read the publisher's advisoryAffected versions, risk and source history
Related advisories and sources
Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.
CVE-2024-47764 · CVE overview and exploitation status
cve-program · CVE-2024-47764
- 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
euvd · EUVD-2024-3106
- 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
nvd · CVE-2024-47764
- 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
osv · GHSA-pxg6-pf52-xh8x
Related changes
Linked by CVE identifierNo related changes are available here.