CVE-2026-46625
JavaScript Cookie: Per-instance prototype hijack in assign() enables cookie-attribute injection
Check your servers for CVE-2026-46625
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-46625 affects js-cookie, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity high, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity high, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.92%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 61.3% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 11 Jun 2026):
- Exploitation
- poc: a proof of concept is public
- Automatable
- yes: an attacker can automate the attack across many targets
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-915 Improperly Controlled Modification of Dynamically-Determined Object Attributes
- CWE-1321 Improperly Controlled Modification of Object Prototype Attributes
Affected products
As the CNA lists them.
Is my server affected?
Find the installed version of js-cookie and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i js-cookie
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2026-46625 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2026-46625RHEL, Rocky, Alma, Fedora
rpm -q js-cookie
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2026-46625Alpine
apk list --installed | grep -i js-cookieWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-46625
trivy image --scanners vuln IMAGE | grep CVE-2026-46625
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- https://access.redhat.com/security/cve/CVE-2026-46625 access.redhat.com · vdb entry
- RHBZ#2487740 bugzilla.redhat.com · issue tracking
- https://access.redhat.com/errata/RHSA-2026:48151 access.redhat.com · vendor advisory
- https://access.redhat.com/errata/RHSA-2026:36625 access.redhat.com · vendor advisory
- https://access.redhat.com/errata/RHSA-2026:56338 access.redhat.com · vendor advisory
- https://access.redhat.com/errata/RHSA-2026:56357 access.redhat.com · vendor advisory
- https://access.redhat.com/errata/RHSA-2026:59153 access.redhat.com · vendor advisory
- https://access.redhat.com/errata/RHSA-2026:48126 access.redhat.com · vendor advisory
- https://access.redhat.com/errata/RHSA-2026:49642 access.redhat.com · vendor advisory
- https://access.redhat.com/errata/RHSA-2026:52768 access.redhat.com · vendor advisory
- https://access.redhat.com/errata/RHSA-2026:60520 access.redhat.com · vendor advisory
- https://access.redhat.com/errata/RHSA-2026:33183 access.redhat.com · vendor advisory
Exploits and proof of concept
- https://github.com/js-cookie/js-cookie/security/advisories/GHSA-qjx8-664m-686j github.com · exploit
Other references
- https://github.com/js-cookie/js-cookie/commit/eb3c40e89731e99b8970faaf35ddad249c6c0020 github.com
- https://github.com/js-cookie/js-cookie/releases/tag/v3.0.7 github.com
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-46625.json security.access.redhat.com
Source: the record CVE-2026-46625 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse