CWE data temporarily unavailableCWE data is currently experiencing intermittent outages, which may cause incomplete section loading on CVE pages. We are actively working on a fix.

CVE-2026-115895

Description

A flaw was found in happy-dom. This vulnerability allows an attacker to achieve arbitrary code execution within the host Node.js environment. When JavaScript evaluation is enabled, the module compiler fails to validate named ECMAScript Module (ESM) import aliases before inserting them into generated code. A remote attacker could exploit this by supplying crafted HTML or module content containing a malicious alias to execute unauthorized code on the host system.

Statement

This vulnerability is rated as Important because an attacker can execute arbitrary commands in the host Node.js runtime without requiring local system credentials. Exposure depends on the application processing untrusted web assets or scripts with JavaScript execution enabled. Deployments that parse only trusted markup or maintain script evaluation disabled are not vulnerable to this flaw.

Mitigation

--- CME Mitigation Guidance (2026-11-02) ---
Disclaimer: The following mitigation solutions are provided as a courtesy, pending the application of an official patch. This content was generated utilizing AI tools in conjunction with data from https://cmetaxonomy.org. Customers are advised to independently evaluate and test these temporary mitigations within their own infrastructure.

The highest-value action is to prevent unvalidated ECMAScript Module import aliases from being interpolated into generated destructuring bindings in Happy DOM: upgrade to happy-dom 21.0.4 (or the fixed Ansible Automation Platform 26/Gateway Rhel/Ansible Automation Platform 27/Gateway Rhel/Rhoai/Odh Feature Server Rhel/Automation Gateway/Automation Platform Ui/Quay/Forgejo builds), which validate imported aliases to ensure they are valid JavaScript binding identifiers before placing them into generated destructuring code, closing all 2 injection vectors (crafted ESM named import alias with default initializers, JSON module import attribute payload). Until patched, this is only a concern on Node.js host environments processing untrusted HTML or ESM modules with JavaScript evaluation enabled — Deployments that parse only trusted markup or maintain script evaluation disabled are unaffected — so disable JavaScript evaluation via enableJavaScriptEvaluation and restrict Happy DOM from parsing or executing untrusted HTML or module content. As a compensating measure, enforce a read-only root filesystem on the Node.js process to prevent dropping webshells or modifying application binaries, deploy endpoint detection and response agents to monitor anomalous child processes and shell invocations from the Node.js host process, configure auditd to record process executions and syscall activity spawned by the Node.js process, and monitor kernel syscalls via eBPF to detect unexpected shells or unauthorized network connections originating from Node.js. These controls limit blast radius and contain exploitation, but they do not fix the underlying unvalidated import alias injection defect — apply the upstream patch to fully remediate.

Highest-impact CME: CME-1309 Script Engine Restriction (Sandbox / Disable) (high)

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score8.8N/A8.8
Attack VectorNetworkN/ANetwork
Attack ComplexityLowN/ALow
Privileges RequiredNoneN/ANone
User InteractionRequiredN/ARequired
ScopeUnchangedN/AUnchanged
ConfidentialityHighN/AHigh
Integrity ImpactHighN/AHigh
Availability ImpactHighN/AHigh

Vector

Red Hat: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

cve.org: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Frequently Asked Questions

Want to get errata notifications? Sign up here.