CVEfocus › CVE database › CVE-2026-46625

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

CVSS 7.5 HighEPSS 1.0% (higher than 61% of CVEs)Published 2026-06-10Updated 2026-09-09Assigner: GitHub_M

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.

CWE-1321CWE-915

What to do

Fixed builds are available from Debian, npm: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

2Fixed
5Fix pending
3Under investigation
1Will not fix
17Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10node-js-cookieFix pendingUBUNTU-CVE-2026-46625
Ubuntu 26.04node-js-cookieUnder investigationUBUNTU-CVE-2026-46625
Ubuntu 25.10node-js-cookieWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-46625
Ubuntu 24.04node-js-cookieUnder investigationUBUNTU-CVE-2026-46625
Ubuntu 22.04node-js-cookieUnder investigationUBUNTU-CVE-2026-46625
Ubuntu 20.04node-js-cookieFix pendingUBUNTU-CVE-2026-46625
Ubuntu 18.04node-js-cookieFix pendingUBUNTU-CVE-2026-46625
Debian 14node-js-cookieFixed3.0.7+~3.0.6-1DEBIAN-CVE-2026-46625
Debian 13node-js-cookieFix pendingDEBIAN-CVE-2026-46625
Debian 12node-js-cookieFix pendingDEBIAN-CVE-2026-46625
Red Hat Enterprise Linux 10grafana-pcpNot affected
Red Hat Enterprise Linux 9grafana-pcpNot affected
Red Hat Enterprise Linux 8grafanaNot affected
Red Hat Enterprise Linux 8grafana-azure-monitorNot affected
Red Hat Enterprise Linux 8grafana-cloudwatchNot affected
Red Hat Enterprise Linux 8grafana-elasticsearchNot affected
Red Hat Enterprise Linux 8grafana-graphiteNot affected
Red Hat Enterprise Linux 8grafana-influxdbNot affected
Red Hat Enterprise Linux 8grafana-lokiNot affected
Red Hat Enterprise Linux 8grafana-mssqlNot affected
Red Hat Enterprise Linux 8grafana-mysqlNot affected
Red Hat Enterprise Linux 8grafana-opentsdbNot affected
Red Hat Enterprise Linux 8grafana-pcpNot affected
Red Hat Enterprise Linux 8grafana-postgresNot affected
Red Hat Enterprise Linux 8grafana-prometheusNot affected
Red Hat Enterprise Linux 8grafana-selinuxNot affected
Red Hat Enterprise Linux 8grafana-stackdriverNot affected
npm libraryjs-cookieFixed3.0.7GHSA-qjx8-664m-686j

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.