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

> Prototype pollution in js-cookie allows attackers to inject malicious cookie attributes, bypassing security controls like SameSite or Secure flags.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Jun 2026
- **Updated:** 9 Sep 2026
- **Also known as:** CLEANSTART-2026-JL16021, CLSA-2026-1782089812, DEBIAN-CVE-2026-46625, ECHO-1569-0744-f0f7, GHSA-qjx8-664m-686j, MINI-4879-mp7p-3fp4, MINI-4vc3-x4mx-2v39, MINI-5697-9fqg-6779, MINI-8r84-xq7m-j33p, MINI-9h79-h2h5-2gfh, MINI-9vr9-mpf4-92fp, MINI-cg3f-q4wf-phpf, MINI-jhj4-7cx6-9c58, MINI-m7qf-mfgq-hx52, MINI-mqgh-vcc7-6v43, MINI-mxc6-6869-w4r4, MINI-p4w4-c5g6-q27h, MINI-pq59-h884-9cg2, MINI-wm42-phmr-7jgh, MINI-xfwr-cq4j-fq93, ROOT-APP-NPM-CVE-2026-46625, UBUNTU-CVE-2026-46625

## What is CVE-2026-46625?

CVE-2026-46625 is a high-severity unsafe deserialization vulnerability in Redhat Enterprise Linux, published on 10 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### 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.

Weakness: CWE-915 (Improperly Controlled Modification of Dynamically-Determined Object Attributes), CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes)

## Which versions are affected by CVE-2026-46625?

2 open source packages ship an affected version, including js-cookie. It affects 6 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `js-cookie` | npm | All versions | 3.0.7 |
| `js-cookie` | npm | All versions | 3.0.7 |

Products: Js-Cookie Javascript Cookie, Redhat 3scale Api Management, Redhat Ansible Automation Platform, Redhat Enterprise Linux, Redhat Openshift Ai, Redhat Openshift Lightspeed.

## How do I fix CVE-2026-46625?

Upgrade js-cookie to 3.0.7 or later.

## Is CVE-2026-46625 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-46625 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-46625 and fix it if it is affected.

What it is: CVE-2026-46625 is a high-severity unsafe deserialization vulnerability in Redhat Enterprise Linux, published on 10 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-46625 exists.

Affected packages and fixed versions:
- js-cookie (npm): affected all versions; fixed in 3.0.7
- js-cookie (npm): affected all versions; fixed in 3.0.7

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-46625/ (Markdown: https://insights.sbomify.com/CVE-2026-46625/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-46625
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-46625
- OSV: https://osv.dev/vulnerability/CVE-2026-46625

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-46625/
Summaries are generated and may contain mistakes; the official description above is the record.
