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
Published · last modified .
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.
EPSS exploit prediction
EPSS 0.009, 60.8th percentile (last changed ); unchanged over 30 days. About EPSS.
Affected products
- Js-Cookie JavaScript Cookie
- Js-Cookie — versions < 3.0.7
- Red Hat 3scale API Management — versions 2.0
- Red Hat Ansible Automation Platform — versions 2.0
- Red Hat Enterprise Linux — versions 10.0, 8.0, 9.0
- Red Hat Openshift Ai
- Red Hat Openshift Lightspeed
Weakness classification (CWE)
References
- https://github.com/js-cookie/js-cookie/commit/eb3c40e89731e99b8970faaf35ddad249c6c0020 (Patch)
- https://github.com/js-cookie/js-cookie/releases/tag/v3.0.7 (Release Notes)
- https://github.com/js-cookie/js-cookie/security/advisories/GHSA-qjx8-664m-686j (Exploit, Vendor Advisory)
- access.redhat.com/errata/RHSA-2026:33183 (Third Party Advisory)
- access.redhat.com/security/cve/CVE-2026-46625 (Third Party Advisory)
- bugzilla.redhat.com/show_bug.cgi (Third Party Advisory, Issue Tracking)
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-46625.json (Third Party Advisory)
- access.redhat.com/errata/RHSA-2026:36625 (Third Party Advisory)
- access.redhat.com/errata/RHSA-2026:48126 (Third Party Advisory)
- access.redhat.com/errata/RHSA-2026:48151 (Third Party Advisory)