Reliance on Cookies without Validation and Integrity Checking Affecting happy-dom package, versions <20.14.6


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.27% (20th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-HAPPYDOM-21826828
  • published29 Oct 2026
  • disclosed28 Oct 2026
  • creditRyan Cruz

Introduced: 28 Oct 2026

NewCVE-2026-118661  (opens in a new tab)
CWE-565  (opens in a new tab)

How to fix?

Upgrade happy-dom to version 20.14.6 or higher.

Overview

happy-dom is a Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.

Affected versions of this package are vulnerable to Reliance on Cookies without Validation and Integrity Checking via the cookie domain scoping logic in CookieDomainUtility and CookieURLUtility, which fails to enforce RFC 6265 domain-match rules and does not consult the Public Suffix List. An attacker-controlled server can set a cookie with a Domain attribute that is not a suffix of the request host (e.g., responding from 127.0.0.1 while claiming Domain=localhost), and happy-dom stores and forwards that cookie to the victim origin. Additionally, CookieURLUtility uses a plain endsWith check without a DNS-label boundary, so a cookie scoped to example.com is incorrectly sent to notexample.com.

CVSS Base Scores

version 4.0
version 3.1