Technical impact
Happy DOM’s CookieContainer does not properly validate or match Domain cookie attributes, allowing an attacker origin to set cookies that appear to belong to a victim origin. This cookie injection can lead to session fixation or unauthorized session hijacking. The flaw arises because Domain matching does not enforce a DNS‑label boundary, so a cookie set for a public suffix or a hostname that shares a suffix is treated as a match.
Affected Systems
The vulnerability affects all versions of Happy DOM prior to 20.14.6. The affected implementation is capricorn86:happy-dom, an open‑source JavaScript DOM that is used in server‑side rendering and prerendering applications.
Risk and Exploitability
With a CVSS score of 6.5, the risk is moderate to high. Although the EPSS score is low at 0.272%, the lack of Domain validation makes exploitation straightforward when an application accesses attacker‑controlled origins before establishing a user context. The vulnerability is not listed in the CISA KEV catalog, but any system that still uses an outdated Happy DOM version could be compromised through cookie injection or session fixation attacks.
Github GHSA