Skip to main content

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)

0
Medium
Published: 06/10/2026 (06/10/2026, 22:16:00 UTC)
Source: GCVE Database
Product: node-js-cookie

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

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

Affected software

Ubuntu:18.04:LTSmore threats →ghsa
node-js-cookie
pkg:deb/ubuntu/node-js-cookie?arch=source&distro=bionic
Affected versions
=2.2.0-1
Ubuntu:20.04:LTSmore threats →ghsa
node-js-cookie
pkg:deb/ubuntu/node-js-cookie?arch=source&distro=focal
Affected versions
=2.2.0-2=2.2.1-1
Ubuntu:22.04:LTSmore threats →ghsa
node-js-cookie
pkg:deb/ubuntu/node-js-cookie?arch=source&distro=jammy
Affected versions
=2.2.1-1=2.2.1-2=3.0.1+~3.0.0-2
Ubuntu:24.04:LTSmore threats →ghsa
node-js-cookie
pkg:deb/ubuntu/node-js-cookie?arch=source&distro=noble
Affected versions
=3.0.1+~3.0.0-3
Ubuntu:25.10more threats →ghsa
node-js-cookie
pkg:deb/ubuntu/node-js-cookie?arch=source&distro=questing
Affected versions
=3.0.1+~3.0.0-3
Ubuntu:26.10more threats →ghsa
node-js-cookie
pkg:deb/ubuntu/node-js-cookie?arch=source&distro=stonking
Affected versions
=3.0.1+~3.0.0-3=3.0.7+~3.0.6-2=3.0.8+~3.0.6-1
Ubuntu:26.04:LTSmore threats →ghsa
node-js-cookie
pkg:deb/ubuntu/node-js-cookie?arch=source&distro=resolute
Affected versions
=3.0.1+~3.0.0-3

Run 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

AILast updated: 10/18/2026, 01:28:10 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses