Live threats

All CVEs / Js-cookie

CVE-2026-46625Js-cookie Javascript Cookie

High 7.5 No auth needed

Priority
60
CVSS 3.1
7.5
EPSS
—
Auth required
No
Published
Jun 10, 2026
Updated
Sep 9, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-1321, CWE-915
SSVC (CISA)
Exploitation: proof of concept · Automatable: yes · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Javascript Cookie.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm js-cookie < 3.0.7 3.0.7 npm install js-cookie@3.0.7

Per OSV / GitHub Advisories (GHSA-qjx8-664m-686j). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
js-cookiejavascript_cookie< 3.0.7
redhat3scale_api_management2.0
redhatansible_automation_platform2.0
redhatopenshift_aiall
redhatopenshift_lightspeedall
redhatenterprise_linux8.0
redhatenterprise_linux9.0
redhatenterprise_linux10.0

Official sources

References

Links published by the sources. Open them with care.