ubuntu-cve-2026-46625
Vulnerability from osv_ubuntu
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.
{
"affected": [
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-js-cookie",
"binary_version": "2.2.0-1"
}
]
},
"package": {
"ecosystem": "Ubuntu:18.04:LTS",
"name": "node-js-cookie",
"purl": "pkg:deb/ubuntu/node-js-cookie@2.2.0-1?arch=source\u0026distro=bionic"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.2.0-1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-js-cookie",
"binary_version": "2.2.1-1"
}
]
},
"package": {
"ecosystem": "Ubuntu:20.04:LTS",
"name": "node-js-cookie",
"purl": "pkg:deb/ubuntu/node-js-cookie@2.2.1-1?arch=source\u0026distro=focal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.2.0-2",
"2.2.1-1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-js-cookie",
"binary_version": "3.0.1+~3.0.0-2"
}
]
},
"package": {
"ecosystem": "Ubuntu:22.04:LTS",
"name": "node-js-cookie",
"purl": "pkg:deb/ubuntu/node-js-cookie@3.0.1+~3.0.0-2?arch=source\u0026distro=jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.2.1-1",
"2.2.1-2",
"3.0.1+~3.0.0-2"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-js-cookie",
"binary_version": "3.0.1+~3.0.0-3"
}
]
},
"package": {
"ecosystem": "Ubuntu:24.04:LTS",
"name": "node-js-cookie",
"purl": "pkg:deb/ubuntu/node-js-cookie@3.0.1+~3.0.0-3?arch=source\u0026distro=noble"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"3.0.1+~3.0.0-3"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-js-cookie",
"binary_version": "3.0.1+~3.0.0-3"
}
]
},
"package": {
"ecosystem": "Ubuntu:25.10",
"name": "node-js-cookie",
"purl": "pkg:deb/ubuntu/node-js-cookie@3.0.1+~3.0.0-3?arch=source\u0026distro=questing"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"3.0.1+~3.0.0-3"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-js-cookie",
"binary_version": "3.0.1+~3.0.0-3"
}
]
},
"package": {
"ecosystem": "Ubuntu:26.04:LTS",
"name": "node-js-cookie",
"purl": "pkg:deb/ubuntu/node-js-cookie@3.0.1+~3.0.0-3?arch=source\u0026distro=resolute"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"3.0.1+~3.0.0-3"
]
}
],
"aliases": [],
"details": "JavaScript Cookie is a JavaScript API for handling cookies, client-side. Prior to version 3.0.7, js-cookie\u0027s internal assign() helper copies properties with for...in + plain assignment. When the source object is produced by JSON.parse, the JSON object\u0027s \"__proto__\" member is an own enumerable property, so the for\u2026in 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.",
"id": "UBUNTU-CVE-2026-46625",
"modified": "2026-06-30T16:22:51Z",
"published": "2026-06-10T22:16:00Z",
"references": [
{
"type": "REPORT",
"url": "https://ubuntu.com/security/CVE-2026-46625"
},
{
"type": "REPORT",
"url": "https://www.cve.org/CVERecord?id=CVE-2026-46625"
},
{
"type": "REPORT",
"url": "https://github.com/js-cookie/js-cookie/commit/eb3c40e89731e99b8970faaf35ddad249c6c0020"
},
{
"type": "REPORT",
"url": "https://github.com/js-cookie/js-cookie/releases/tag/v3.0.7"
},
{
"type": "REPORT",
"url": "https://github.com/js-cookie/js-cookie/security/advisories/GHSA-qjx8-664m-686j"
}
],
"related": [],
"schema_version": "1.7.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
},
{
"score": "medium",
"type": "Ubuntu"
}
],
"upstream": [
"CVE-2026-46625"
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.