REDHAT-BUG-2487740: High severity npm/js-cookie vulnerability

Published Jun 10, 2026
·
Updated

JavaScript Cookie is a JavaScript API for handling cookies, client-side. Prior to version 3.0.7, js-cookie's internal assign() helper copies properties with for...in + plain assignment. When the source object is produced by JSON.parse, the JSON object's "proto" member is an own enumerable property, so the for…in enumerates it and the target[key] = source[key] write triggers the Object.prototype.proto setter on the fresh target ({}). The result is a per-instance prototype hijack: Object.prototype itself is untouched, but the merged attributes object now inherits attacker-controlled keys. Because the consuming set() function then enumerates the merged object with another for...in, every key the attacker placed on the polluted prototype lands in the resulting Set-Cookie string as an attribute pair. The attacker can set domain=, secure=, samesite=, expires=, and path= on cookies whose attributes the developer thought were locked down. This issue has been patched in version 3.0.7.

Affected Software

1 affected component
npm/js-cookie<3.0.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade js-cookie to a version that resolves this vulnerability.

    Fixed in 3.0.7

Event History

Jun 10, 2026
Data Sourced
via Red Hat·10:01 PM
DescriptionSeverityAffected Software
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 REDHAT-BUG-2487740?

The severity of REDHAT-BUG-2487740 is classified as high with a score of 7.

2

How do I fix REDHAT-BUG-2487740?

To fix REDHAT-BUG-2487740, update js-cookie to version 3.0.7 or later.

3

What type of vulnerability is REDHAT-BUG-2487740?

REDHAT-BUG-2487740 is a client-side JavaScript vulnerability related to cookie handling.

4

What software is affected by REDHAT-BUG-2487740?

The affected software is npm/js-cookie prior to version 3.0.7.

5

When was REDHAT-BUG-2487740 published?

REDHAT-BUG-2487740 was published on June 10, 2026.

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