CVE-2025-61927
JavaScript vulnerability analysis and mitigation

Overview

Happy DOM v19 and lower contains a critical security vulnerability (CVE-2025-61927) that exposes systems to Remote Code Execution (RCE) attacks. The vulnerability was discovered and disclosed on October 9, 2025, affecting the JavaScript implementation of a web browser without its graphical user interface. The vulnerability stems from an improperly isolated Node.js VM Context, which allows untrusted JavaScript code to escape the VM and gain access to process-level functionality (GitHub Advisory).

Technical details

The vulnerability occurs because all classes and functions inherit from Function, allowing attackers to walk the constructor chain to obtain Function at process level. With CommonJS, attackers can gain access to the require() function to import modules. The vulnerability has received a CVSS v4.0 score of 7.2 (HIGH) with vector string CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:A/VC:L/VI:H/VA:H/SC:H/SI:H/SA:H. The issue is classified as CWE-94 (Improper Control of Generation of Code) (GitHub Advisory, NVD).

Impact

The vulnerability can lead to multiple severe impacts including data exfiltration through access to environment variables and configuration files, lateral movement via network access to internal systems, arbitrary code execution through child process access, and system persistence through file system access. This is particularly concerning for Server-Side Rendering (SSR) implementations and testing frameworks using Happy-DOM with untrusted content (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in version 20.0.0, which disables JavaScript evaluation by default. Users are recommended to either upgrade to version 20.0.0 or above, or run Node.js with the '--disallow-code-generation-from-strings' flag if JavaScript evaluation needs to be enabled. For users unable to update immediately, it's recommended to disable JavaScript evaluation unless the content within the environment is completely trusted (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-365g-vjw2-grx8HIGH8.8
  • JavaScriptJavaScript
  • n8n
NoNoOct 09, 2025
GHSA-j44m-5v8f-gc9cHIGH7.7
  • JavaScriptJavaScript
  • flowise
NoYesOct 10, 2025
CVE-2025-11569HIGH7.7
  • JavaScriptJavaScript
  • cross-zip
NoNoOct 10, 2025
CVE-2025-61927HIGH7.2
  • JavaScriptJavaScript
  • happy-dom
NoYesOct 10, 2025
CVE-2025-61925MEDIUM6.5
  • JavaScriptJavaScript
  • astro
NoYesOct 10, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management