Описание
In versions before 20.0.2, it was found that --disallow-code-generation-from-strings is not sufficient for isolating untrusted JavaScript in happy-dom. The untrusted script and the rest of the application still run in the same Isolate/process, so attackers can deploy prototype pollution payloads to hijack important references like "process" in the example below, or to hijack control flow via flipping checks of undefined property. This vulnerability is due to an incomplete fix for CVE-2025-61927. The vulnerability is fixed in 20.0.2.
A sandbox escape in happy-dom allows untrusted JavaScript to run in the same V8 isolate and process as the host application. An attacker can use prototype pollution to overwrite built-in objects (for example Object.prototype) and thereby obtain privileged references such as process or require. This enables arbitrary command execution, information disclosure (access to in-process secrets and environment), and can also be used to cause denial of service (process crash or out-of-memory conditions) or exfiltrate data over the network.
Отчет
The impact is IMPORTANT because disabling dynamic code generation alone does not create a separate execution context. Trusted and untrusted code still share the same global prototypes and intrinsic objects; a polluted prototype is immediately visible to the rest of the process. The flaw arises from incomplete sandboxing. The mitigation for dynamic code generation only blocks eval and Function but does not isolate execution contexts. As both trusted and untrusted scripts share prototypes in one isolate, a polluted built-in can redirect internal lookups or override constructors to expose privileged globals. This enables arbitrary command execution from within the supposedly restricted environment.
Затронутые пакеты
| Платформа | Пакет | Состояние | Рекомендация | Релиз |
|---|---|---|---|---|
| Red Hat OpenShift Dev Spaces | devspaces/traefik-rhel9 | Not affected |
Показывать по
Дополнительная информация
Статус:
8.3 High
CVSS3
Связанные уязвимости
In versions before 20.0.2, it was found that --disallow-code-generation-from-strings is not sufficient for isolating untrusted JavaScript in happy-dom. The untrusted script and the rest of the application still run in the same Isolate/process, so attackers can deploy prototype pollution payloads to hijack important references like "process" in the example below, or to hijack control flow via flipping checks of undefined property. This vulnerability is due to an incomplete fix for CVE-2025-61927. The vulnerability is fixed in 20.0.2.
happy-dom's `--disallow-code-generation-from-strings` is not sufficient for isolating untrusted JavaScript
8.3 High
CVSS3