CWE
74 79 20
Advisory Published
Advisory Published
Updated

CVE-2024-47764: cookie accepts cookie name, path, and domain with out of bounds characters

First published: Fri Oct 04 2024(Updated: )

### 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

Credit: security-advisories@github.com

Affected SoftwareAffected VersionHow to fix
npm/cookie<0.7.0
0.7.0

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Parent vulnerabilities

(Appears in the following advisories)

Frequently Asked Questions

  • What is the severity of CVE-2024-47764?

    CVE-2024-47764 is classified as a high severity vulnerability due to the potential for cross-site scripting (XSS) exploits.

  • How do I fix CVE-2024-47764?

    To fix CVE-2024-47764, update the cookie package to version 0.7.1 or later.

  • What type of vulnerability is CVE-2024-47764?

    CVE-2024-47764 is a cross-site scripting (XSS) vulnerability related to cookie handling.

  • Which software is affected by CVE-2024-47764?

    The vulnerability impacts the 'cookie' package version 0.7.0 and below from npm.

  • What consequences may arise from CVE-2024-47764?

    Exploitation of CVE-2024-47764 could allow attackers to manipulate cookie values, potentially leading to unauthorized actions or data theft.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203