js-cookie: Improperly Controlled Modification of Object Prototype Attributes
CVE-2026-46625 is a high-severity improperly controlled modification of object prototype attributes vulnerability in js-cookie, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected js-cookie versions: < 3.0.7. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.92% chance of exploitation within 30 days, higher than 61% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update Javascript Cookie to 3.0.7 or a later version.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
Version data comes from the organisation that assigned the CVE; 2 further products are omitted here. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- NoneNo data is disclosed.
- Integrity
- HighData or code can be modified at will.
- Availability
- NoneAvailability is not affected.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N. Scored by CNA (github.com).
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.5 | High | CNA (github.com) |
| CVSS 3.1 | 7.5 | High | CNA |
Official 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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improperly Controlled Modification of Object Prototype Attributes
The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.
How developers prevent this class of flaw
- By freezing the object prototype first (for example, Object.freeze(Object.prototype)), modification of the prototype becomes impossible.
- By blocking modifications of attributes that resolve to object prototype, such as proto or prototype, this weakness can be mitigated.
- When handling untrusted objects, validating using a schema can be used.
More Improperly Controlled Modification of Object Prototype Attributes vulnerabilities (CWE-1321)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: yes, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
Third-party and government advisories
- access.redhat.com/errata/RHSA-2026:33183Third Party Advisory
- access.redhat.com/errata/RHSA-2026:36625Third Party Advisory
- access.redhat.com/errata/RHSA-2026:48126Third Party Advisory
- access.redhat.com/errata/RHSA-2026:48151Third Party Advisory
- access.redhat.com/errata/RHSA-2026:49642Third Party Advisory
- access.redhat.com/errata/RHSA-2026:52768Third Party Advisory
- access.redhat.com/errata/RHSA-2026:56338Third Party Advisory
- access.redhat.com/errata/RHSA-2026:56357Third Party Advisory
- access.redhat.com/errata/RHSA-2026:59153Third Party Advisory
- access.redhat.com/security/cve/CVE-2026-46625Third Party Advisory
- bugzilla.redhat.com/show_bug.cgi?id=2487740Issue Tracking, Third Party Advisory
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-46625.jsonThird Party Advisory
Other references
Recent Improperly Controlled Modification of Object Prototype Attributes vulnerabilities
- 8.2 High severity
- 8.2 High severity
- 8.2 High severity
- 8.2 High severity
- 9.8 Critical severity
- 8.2 High severity
Spotted an error? Tell us.