Direct naar de inhoud
⚡ Kritieke cyberalerts voor jouw sector & systemen — direct in je inbox. Aanmelden →
CVE's Videos Dagbriefing

← Terug naar CVE-database

CVE-2026-115895

HIGH · 8.8 CVSS Gepubliceerd: CWE-94

Beschrijving NL

Happy DOM is een JavaScript-implementatie van een webbrowser zonder grafische gebruikersinterface. Van 17.0.0 tot 21.0.4 accepteert packages/happy-dom/src/module/ECMAScriptModuleCompiler.ts een benoemde ESM-importalias zonder te valideren dat het een JavaScript-binding-ID is voordat deze in een gegenereerde destructieve binding wordt ingevoegd. Met enableJavaScriptEvaluation ingeschakeld, kan door een aanvaller gecontroleerde HTML- of modulebroncode een ongeldige alias gebruiken die na compilatie een geldige standaardinitialisatiefunctie wordt. Hierdoor wordt de gegenereerde JavaScript-code uitgevoerd in het Node.js-hostproces. Het getoonde bereikbare pad maakt gebruik van een JSON-module-importattribuut, waardoor wordt voorkomen dat de kwaadwillige alias opnieuw wordt gegenereerd bij een latere ESM-circulaire importtoewijzing en de syntactisch geldige functie behouden blijft. Deze onvolledige oplossing voor CVE-2026-33943 is een duidelijk restpad omdat de eerdere remediëring het lokale exportimportnaampad heeft gevalideerd, maar niet de benoemde importalias. Dit probleem is opgelost in versie 21.0.4.

Origineel (Engels) tonen

Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. From 17.0.0 until 21.0.4, packages/happy-dom/src/module/ECMAScriptModuleCompiler.ts accepts a named ESM import alias without validating that it is a JavaScript binding identifier before inserting it into a generated destructuring binding. With enableJavaScriptEvaluation enabled, attacker-controlled HTML or module source can use an invalid alias that becomes a valid default initializer after compilation, causing the generated JavaScript to execute in the Node.js host process. The demonstrated reachable path uses a JSON module import attribute, which prevents the malicious alias from being emitted again in a later ESM circular-import assignment and keeps the generated function syntactically valid. This incomplete fix for CVE-2026-33943 is a distinct residual path because the earlier remediation validated the local export importName path but not the named-import alias. This issue is fixed in version 21.0.4.

References