# CVE-2026-46625: JavaScript Cookie: Per-instance prototype hijack in assign() enables cookie-attribute injection

> CVE-2026-46625: JavaScript Cookie: Per-instance prototype hijack in assign() enables cookie-attribute injection. CVSS 7.5 (CVSS 3.1).

Canonical: https://rewindex.com/cve/CVE-2026-46625
Last updated: 2026-09-09T13:20:18Z

- Published: 2026-06-10 21:18 UTC · Updated: 2026-09-09 13:20 UTC · Assigner: GitHub\_M
- CVSS: 7.5 (CVSS 3.1) · Severity: High · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- EPSS: 0.92%, 60th percentile (scored 2026-10-25)
- CISA KEV: no
- CWE: CWE-1321

## Description

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 vendors and products

- js-cookie: js-cookie
- Red Hat: Cryostat 4 on RHEL 9
- Red Hat: OpenShift Lightspeed
- Red Hat: Red Hat 3scale API Management Platform 2
- Red Hat: Red Hat Advanced Cluster Security for Kubernetes 4.10
- Red Hat: Red Hat Ansible Automation Platform 2
- Red Hat: Red Hat Ansible Automation Platform 2.1
- Red Hat: Red Hat Ansible Automation Platform 2.2
- Red Hat: Red Hat Ansible Automation Platform 2.7
- Red Hat: Red Hat Developer Hub 1.10
- Red Hat: Red Hat Developer Hub 1.9
- Red Hat: Red Hat Discovery 2
- Red Hat: Red Hat Enterprise Linux 10
- Red Hat: Red Hat Enterprise Linux 8
- Red Hat: Red Hat Enterprise Linux 9
- Red Hat: Red Hat JBoss Enterprise Application Platform 7
- Red Hat: Red Hat JBoss Enterprise Application Platform 8
- Red Hat: Red Hat JBoss Enterprise Application Platform Expansion Pack
- Red Hat: Red Hat OpenShift AI 3.4
- Red Hat: Red Hat OpenShift AI (RHOAI)
- Red Hat: Red Hat OpenShift Container Platform 4
- Red Hat: Red Hat OpenShift Service Mesh 3.3

## Tracked companies

- [Bitbucket](https://rewindex.com/company/bitbucket.md)
- [Confluence](https://rewindex.com/company/confluence.md)
- [Jira](https://rewindex.com/company/jira.md)

## References

- [CVE record on cve.org](https://www.cve.org/CVERecord?id=CVE-2026-46625)
- [NVD entry](https://nvd.nist.gov/vuln/detail/CVE-2026-46625)
- [https://github.com/js-cookie/js-cookie/commit/eb3c40e89731e99b8970faaf35ddad249c6c0020](https://github.com/js-cookie/js-cookie/commit/eb3c40e89731e99b8970faaf35ddad249c6c0020)
- [https://github.com/js-cookie/js-cookie/releases/tag/v3.0.7](https://github.com/js-cookie/js-cookie/releases/tag/v3.0.7)
- [https://github.com/js-cookie/js-cookie/security/advisories/GHSA-qjx8-664m-686j](https://github.com/js-cookie/js-cookie/security/advisories/GHSA-qjx8-664m-686j)

---

_Sources: CVE records from the CVE Program (cve.org). CVE® is a registered trademark of The MITRE Corporation. (https://www.cve.org/) This product uses data from the NVD API but is not endorsed or certified by the NVD. (https://nvd.nist.gov/) Known Exploited Vulnerabilities catalog from CISA. (https://www.cisa.gov/known-exploited-vulnerabilities-catalog) EPSS scores from FIRST (Exploit Prediction Scoring System). (https://www.first.org/epss/)_


---
Canonical: https://rewindex.com/cve/CVE-2026-46625 · Markdown: https://rewindex.com/cve/CVE-2026-46625.md · JSON: https://rewindex.com/api/v1/cves/CVE-2026-46625 · Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) · Generated 2026-10-26T03:12:03.778Z
