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

Published Oct 4, 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

Other sources

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.

NVD

jshttp cookie could allow a remote attacker to bypass security restrictions, caused by improper input validation by the cookie name, path, and domain. By sending a specially crafted request, an attacker could exploit this vulnerability to alter other fields of the cookie.

IBM

Affected Software

7 affected componentsFixes available
npm/cookie<0.7.0
0.7.0
IBM Cloud Pak System<=2.3.4.0
IBM Cloud Pak System<=2.3.4.1 2.3.4.1 ifix1
IBM Cloud Pak System<=2.3.5.0
IBM Cloud Pak System<=2.3.6.0
IBM OS Image for Red Hat Linux Systems<=4.0.4.0 4.0.5.0 4.0.6.0 4.0.7.0
IBM OS Image for Red Hat Linux Systems<=5.0.0.0 5.0.1.0

Event History

Oct 4, 2024
CVE Published
via MITRE·07:09 PM
Data Sourced
via MITRE·07:09 PM
DescriptionWeakness
Data Sourced
via NVD·08:15 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·08:31 PM
Jan 30, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

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.

2

How do I fix CVE-2024-47764?

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

3

What type of vulnerability is CVE-2024-47764?

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

4

Which software is affected by CVE-2024-47764?

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

5

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.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203