Prototype Pollution in Js-Cookie JavaScript Cookie
CVE-2026-46625
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.
Vulnerability class: Prototype Pollution
EPSS: 0.009 (58.5th percentile) — read the EPSS interpretation.
CVSS v3 metric
CVSS v3 base score 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
Affected products
- Js-cookie Javascript_cookie
- Js-cookie — versions < 3.0.7
- Redhat 3scale_api_management — versions 2.0
- Redhat Ansible_automation_platform — versions 2.0
- Redhat Enterprise_linux — versions 10.0, 8.0, 9.0
- Redhat Openshift_ai
- Redhat Openshift_lightspeed
Weakness classification (CWE)
References
- security-advisories@github.com (Patch, x_refsource_MISC)
- security-advisories@github.com (x_refsource_MISC, Release Notes)
- security-advisories@github.com (x_refsource_CONFIRM, Exploit, Vendor Advisory)
- 0b0ca135-0b70-47e7-9f44-1890c2a1c46c (Third Party Advisory)
- 0b0ca135-0b70-47e7-9f44-1890c2a1c46c (Third Party Advisory)
- 0b0ca135-0b70-47e7-9f44-1890c2a1c46c (Third Party Advisory, Issue Tracking)
- 0b0ca135-0b70-47e7-9f44-1890c2a1c46c (Third Party Advisory)
- 0b0ca135-0b70-47e7-9f44-1890c2a1c46c (Third Party Advisory)
- 0b0ca135-0b70-47e7-9f44-1890c2a1c46c (Third Party Advisory)
- 0b0ca135-0b70-47e7-9f44-1890c2a1c46c (Third Party Advisory)
Frequently asked questions
- What is CVE-2026-46625?
- CVE-2026-46625 is a high-severity vulnerability in Js-Cookie JavaScript Cookie, classified under Improperly Controlled Modification of Object Prototype Attributes (Prototype Pollution). CVSS score: 7.5/10. Published 2026-06-10.
- How severe is CVE-2026-46625?
- High severity. CVSS v3 base score is 7.5 out of 10.