{"id":"CVE-2026-46625","published":"2026-06-10T21:18:05Z","modified":"2026-09-09T12:05:08Z","title":"JavaScript Cookie: Per-instance prototype hijack in assign() enables cookie-attribute injection","vendor":"js-cookie","product":"js-cookie","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00919,"percentile":0.61128,"provenance":"source"},"cwes":[{"id":"CWE-1321","name":"Improperly Controlled Modification of Object Prototype Attributes"},{"id":"CWE-915","name":"Improperly Controlled Modification of Dynamically-Determined Object Attributes"}],"references":[{"url":"https://github.com/js-cookie/js-cookie/security/advisories/GHSA-qjx8-664m-686j","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/js-cookie/js-cookie/commit/eb3c40e89731e99b8970faaf35ddad249c6c0020","tags":["x_refsource_MISC"]},{"url":"https://github.com/js-cookie/js-cookie/releases/tag/v3.0.7","tags":["x_refsource_MISC"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-46625","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2487740","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-46625.json","tags":["x_sadp-csaf-vex"]},{"url":"https://access.redhat.com/errata/RHSA-2026:48151","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:36625","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:56338","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:56357","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:59153","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:48126","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:49642","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:52768","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:60520","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:33183","tags":["vendor-advisory","x_refsource_REDHAT"]}],"priority":{"score":17.5,"factors":[{"name":"EPSS percentile","points":12.23},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"js-cookie","affectedVersions":[{"vendor":"js-cookie","product":"js-cookie","versions":["< 3.0.7"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-06-11T14:46:15.083511Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"js-cookie","vulnerableRanges":["<3.0.7"],"patched":["3.0.7"],"from":["GHSA-qjx8-664m-686j"],"provenance":"source"}],"summary":{"text":"The js-cookie JavaScript cookie-handling library, prior to version 3.0.7, has a prototype pollution flaw in its internal assign() helper, which copies properties from a source object into a target using for...in and plain assignment.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:43:10Z"},"euvd":{"id":"EUVD-2026-36154","exploited":false,"provenance":"source"}}