Capricorn86 happy-dom
@happy-dom/server-renderer: ServerRendererServer Target-Origin Bypass SSRF / Open Proxy
Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. Prior to 21.0.2, the Happy DOM server-renderer package's ServerRendererServer accepts unauthenticated HTTP/2 requests and resolves attacker-controlled :path values against server.targetOrigin in #onIncomingRequest in packages/@happy-dom/server-renderer/src/ServerRendererServer.ts without confirming that the resolved origin remains trusted before calling fetch. A protocol-relative path can change the destination to an arbitrary HTTP or HTTPS endpoint reachable by the server, including local and internal services, and the proxy relays the fetched response headers and body to the requester. This issue is fixed in version 21.0.2.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 21.0.2
Fixed in 21.0.2
Mitigation
Upgrade happy-dom to 21.0.2 or later.
References
- Vendor advisory github.com/capricorn86/happy-dom/security/advi…
- Patch github.com/capricorn86/happy-dom/pull/2520
- Patch github.com/capricorn86/happy-dom/commit/1f3ffd…
1 more
- Release notes github.com/capricorn86/happy-dom/releases/tag/…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.