Server-side Request Forgery (SSRF) Affecting @happy-dom/server-renderer package, versions <21.0.2


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.39% (34th 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 Learn

Learn about Server-side Request Forgery (SSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-HAPPYDOMSERVERRENDERER-21826827
  • published29 Oct 2026
  • disclosed28 Oct 2026
  • creditEQSTLab

Introduced: 28 Oct 2026

NewCVE-2026-118659  (opens in a new tab)
CWE-918  (opens in a new tab)

How to fix?

Upgrade @happy-dom/server-renderer to version 21.0.2 or higher.

Overview

@happy-dom/server-renderer is an Use Happy DOM for server-side rendering (SSR) or as a static site generator (SSG).

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the proxy request handler in ServerRendererServer.ts, where the constructed URL is not validated against the configured targetOrigin before being fetched. An attacker can supply a protocol-relative URL (e.g. //attacker-host/path) as the request path, causing new URL(request.url, targetOrigin) to resolve to an entirely different origin, bypassing the intended restriction and allowing the proxy to fetch arbitrary internal or external resources. The fix adds an explicit origin comparison after URL construction and enforces the same check on each redirect hop.

CVSS Base Scores

version 4.0
version 3.1