Node js cookie: Prior to version 3.0.7, js-cookie's internal assign() helper copies properties with for...in + plain assignment. (CVE-2026-46625)
Description
Node js-cookie versions prior to 3.0.7 contain a prototype pollution vulnerability in the internal assign() helper. This occurs because the helper copies properties using for...in enumeration and plain assignment, which allows attacker-controlled __proto__ properties from JSON-parsed objects to hijack the prototype of merged attribute objects. This leads to attacker-controlled cookie attributes such as domain, secure, samesite, expires, and path being set unexpectedly. The issue is patched in version 3.0.7.
CVSS v3.1
Score 7.5high
Affected software
pkg:deb/ubuntu/node-js-cookie?arch=source&distro=bionicpkg:deb/ubuntu/node-js-cookie?arch=source&distro=focalpkg:deb/ubuntu/node-js-cookie?arch=source&distro=jammypkg:deb/ubuntu/node-js-cookie?arch=source&distro=noblepkg:deb/ubuntu/node-js-cookie?arch=source&distro=questingpkg:deb/ubuntu/node-js-cookie?arch=source&distro=stonkingpkg:deb/ubuntu/node-js-cookie?arch=source&distro=resoluteRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in node-js-cookie before version 3.0.7 arises from the assign() helper copying properties with for...in and plain assignment. When the source object is derived from JSON.parse, the __proto__ property is enumerable and copied, causing a per-instance prototype hijack on the merged attributes object. This hijack allows an attacker to inject arbitrary cookie attributes that the developer intended to be fixed, such as domain, secure, samesite, expires, and path. This can lead to manipulation of cookie behavior. The vulnerability is addressed in version 3.0.7.
Potential Impact
The vulnerability enables an attacker to control cookie attributes by injecting properties into the prototype of the merged attributes object. This can result in unauthorized modification of cookie parameters like domain and security flags, potentially undermining cookie security policies. There is no direct confidentiality or availability impact reported. The CVSS score is 7.5 (high impact on integrity).
Mitigation Recommendations
Upgrade node-js-cookie to version 3.0.7 or later, where this prototype pollution vulnerability is fixed. No other mitigation is indicated by the vendor advisory.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- UBUNTU-CVE-2026-46625
- Osv Schema Version
- 1.7.0
- Ecosystems
- ["Ubuntu:18.04:LTS","Ubuntu:20.04:LTS","Ubuntu:22.04:LTS","Ubuntu:24.04:LTS","Ubuntu:25.10","Ubuntu:26.10","Ubuntu:26.04:LTS"]
- Cvss Version
- 3.1
Threat ID: 6ad3f6512cdf04f656665d09
Added to database: 10/17/2026, 22:27:29 UTC
Last enriched: 10/18/2026, 01:28:10 UTC
Last updated: 10/18/2026, 01:28:10 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.