<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>CVE-2026-46625 — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/cve-2026-46625/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 21 May 2026 21:21:39 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/cve-2026-46625/feed.xml" rel="self" type="application/rss+xml"/><item><title>js-cookie Prototype Pollution via __proto__ Attribute Injection (CVE-2026-46625)</title><link>https://feed.craftedsignal.io/briefs/2026-05-js-cookie-prototype-pollution/</link><pubDate>Thu, 21 May 2026 21:21:39 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-js-cookie-prototype-pollution/</guid><description>The js-cookie library is vulnerable to prototype pollution via the `assign()` function when processing JSON-derived objects, enabling an attacker to inject arbitrary cookie attributes by manipulating the `__proto__` property, as demonstrated by CVE-2026-46625.</description><content:encoded><![CDATA[<p>The <code>js-cookie</code> library, versions 3.0.5 and earlier, contains a prototype pollution vulnerability (CVE-2026-46625) within its internal <code>assign()</code> function. This function copies properties from source objects to a target object using <code>for...in</code> loops and plain assignment. When processing a source object derived from JSON (e.g., via <code>JSON.parse</code>), the <code>__proto__</code> member becomes an own enumerable property. The <code>assign</code> function iterates over this property and inadvertently triggers the <code>Object.prototype.__proto__</code> setter. This results in a per-instance prototype pollution where attacker-controlled keys are inherited by the merged <code>attributes</code> object, allowing modification of cookie attributes.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker crafts a JSON payload containing a <code>__proto__</code> property with malicious cookie attributes (e.g., domain, secure, samesite, expires, path).</li>
<li>The application fetches configuration data from a backend endpoint, parsing the JSON response using <code>JSON.parse</code>.</li>
<li>The parsed JSON data, containing the attacker&rsquo;s payload, is passed as the <code>attributes</code> argument to <code>Cookies.set()</code>, <code>Cookies.remove()</code>, <code>Cookies.withAttributes()</code>, or <code>Cookies.withConverter()</code>.</li>
<li>The <code>assign()</code> function within <code>js-cookie</code> iterates over the attacker-controlled <code>__proto__</code> property in the source object.</li>
<li>The <code>target[key] = source[key]</code> assignment triggers the <code>Object.prototype.__proto__</code> setter on the target object.</li>
<li>The attacker-provided cookie attributes are added to the prototype of the merged attributes object.</li>
<li>The <code>set()</code> function enumerates the merged object and includes the attacker-injected attributes in the <code>Set-Cookie</code> header.</li>
<li>The browser receives the <code>Set-Cookie</code> header with the attacker-controlled attributes, potentially leading to session hijacking or other security issues.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Applications that use <code>js-cookie</code> and forward JSON-derived objects as the <code>attributes</code> argument to <code>Cookies.set</code>, <code>Cookies.remove</code>, <code>Cookies.withAttributes</code>, or <code>Cookies.withConverter</code> are vulnerable. This pattern is common when cookie configurations are loaded from backend APIs. Successful exploitation allows attackers to control cookie attributes like <code>domain</code>, <code>secure</code>, and <code>samesite</code>, potentially leading to cross-site scripting (XSS) or session fixation attacks. A sample payload <code>{&quot;__proto__&quot;:{&quot;domain&quot;:&quot;evil.example&quot;,&quot;secure&quot;:&quot;false&quot;,&quot;samesite&quot;:&quot;None&quot;}}</code> results in cookies being set for the attacker&rsquo;s domain.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to a patched version of <code>js-cookie</code> that addresses the prototype pollution vulnerability.</li>
<li>Apply the patch suggested in the advisory to <code>src/assign.mjs</code> to prevent the <code>__proto__</code> property from being processed.</li>
<li>Implement input validation to sanitize or reject JSON payloads containing the <code>__proto__</code> property before they are used as cookie attributes.</li>
<li>Deploy the Sigma rule &ldquo;Detect Prototype Pollution via JSON <strong>proto</strong> Attribute in js-cookie&rdquo; to identify exploitation attempts.</li>
<li>Review and audit existing code that uses <code>js-cookie</code> to ensure that JSON-derived objects are not directly passed as cookie attributes.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>prototype-pollution</category><category>javascript</category><category>cookie</category><category>CVE-2026-46625</category></item></channel></rss>