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

Summary

CVECVE-2026-46625
StatePUBLISHED
AssignerGitHub_M
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-06-10 22:16:59 UTC
Updated2026-07-08 13:16:49 UTC
DescriptionJavaScript 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.

Risk And Classification

Primary CVSS: v3.1 7.5 HIGH from ADP

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

EPSS: 0.004320000 probability, percentile 0.347980000 (date 2026-07-09)

Problem Types: CWE-1321 | CWE-915 | CWE-1321 CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') | CWE-915 Improperly Controlled Modification of Dynamically-Determined Object Attributes


VersionSourceTypeScoreSeverityVector
3.1ADPCVSS7.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
3.1[email protected]Secondary7.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
3.10b0ca135-0b70-47e7-9f44-1890c2a1c46cSecondary7.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
3.1CNADECLARED7.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Js-cookie Js-cookie affected < 3.0.7 Not specified
ADP Red Hat Red Hat Advanced Cluster Security For Kubernetes 4.10 Not specified Not specified
ADP Red Hat Red Hat OpenShift Service Mesh 3.3 Not specified Not specified
ADP Red Hat Cryostat 4 Not specified Not specified
ADP Red Hat OpenShift Lightspeed Not specified Not specified
ADP Red Hat Red Hat 3scale API Management Platform 2 Not specified Not specified
ADP Red Hat Red Hat Developer Hub Not specified Not specified
ADP Red Hat Red Hat JBoss Enterprise Application Platform 7 Not specified Not specified
ADP Red Hat Red Hat OpenShift AI RHOAI Not specified Not specified
ADP Red Hat Red Hat JBoss Enterprise Application Platform 8 Not specified Not specified
ADP Red Hat Red Hat JBoss Enterprise Application Platform Expansion Pack Not specified Not specified
ADP Red Hat Red Hat Ansible Automation Platform 2 Not specified Not specified
ADP Red Hat Red Hat Discovery 2 Not specified Not specified
ADP Red Hat Red Hat Enterprise Linux 10 Not specified Not specified
ADP Red Hat Red Hat Enterprise Linux 8 Not specified Not specified
ADP Red Hat Red Hat Enterprise Linux 9 Not specified Not specified
ADP Red Hat Red Hat OpenShift Container Platform 4 Not specified Not specified
ADP Red Hat Self-service Automation Portal 2 Not specified Not specified

References

ReferenceSourceLinkTags
github.com/js-cookie/js-cookie/commit/eb3c40e89731e99b8970faaf35ddad249c... [email protected] github.com
github.com/js-cookie/js-cookie/releases/tag/v3.0.7 [email protected] github.com
security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-46625.json 0b0ca135-0b70-47e7-9f44-1890c2a1c46c security.access.redhat.com
github.com/js-cookie/js-cookie/security/advisories/GHSA-qjx8-664m-686j 134c704f-9b21-4f2e-91b3-4a467353bcc0 github.com
bugzilla.redhat.com/show_bug.cgi 0b0ca135-0b70-47e7-9f44-1890c2a1c46c bugzilla.redhat.com
access.redhat.com/security/cve/CVE-2026-46625 0b0ca135-0b70-47e7-9f44-1890c2a1c46c access.redhat.com
access.redhat.com/errata/RHSA-2026:36625 0b0ca135-0b70-47e7-9f44-1890c2a1c46c access.redhat.com
access.redhat.com/errata/RHSA-2026:33183 0b0ca135-0b70-47e7-9f44-1890c2a1c46c access.redhat.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Additional Advisory Data

SourceTimeEvent
ADP2026-06-10T22:01:17.685ZReported to Red Hat.
ADP2026-06-10T21:18:05.372ZMade public.

Solutions

ADP: RHSA-2026:36625: Red Hat Advanced Cluster Security for Kubernetes 4.10

ADP: RHSA-2026:33183: Red Hat OpenShift Service Mesh 3.3

© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report