{"answers":{"affected":"2 open source packages ship an affected version, including happy-dom. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33943 exists.","fix":"Upgrade happy-dom to 20.8.8 or later.","what":"CVE-2026-33943 is a high-severity code injection vulnerability in capricorn86 happy-dom, published on 27 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-33943 and fix it if it is affected.\n\nWhat it is: CVE-2026-33943 is a high-severity code injection vulnerability in capricorn86 happy-dom, published on 27 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33943 exists.\n\nAffected packages and fixed versions:\n- happy-dom (npm): affected from 15.10.0; fixed in 20.8.8\n- happy-dom (npm): affected from 15.10.0; fixed in 20.8.8\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-33943/ (Markdown: https://insights.sbomify.com/CVE-2026-33943/index.md)","id":"CVE-2026-33943","markdown":"https://insights.sbomify.com/CVE-2026-33943/index.md","name":"CVE-2026-33943","record":{"aliases":["GHSA-6q6h-j7hj-3r64"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"JavaScript browser library","requires_auth":"none","summary":"Attackers can achieve remote code execution by injecting malicious JavaScript into ES module export declarations processed by the Happy DOM library.","user_interaction":"required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"happy_dom","vendor":"capricorn86"}],"cvss":{"score":8.8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-917","name":"Improper Neutralization of Special Elements used in an Expression Language Statement"},{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"description":"Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. In versions 15.10.0 through 20.8.7, a code injection vulnerability in `ECMAScriptModuleCompiler` allows an attacker to achieve Remote Code Execution (RCE) by injecting arbitrary JavaScript expressions inside `export { }` declarations in ES module scripts processed by happy-dom. The compiler directly interpolates unsanitized content into generated code as an executable expression, and the quote filter does not strip backticks, allowing template literal-based payloads to bypass sanitization. Version 20.8.8 fixes the issue.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Happy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable code","id":"CVE-2026-33943","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"code_injection","year":"2026"},"n_packages":2,"n_references":3,"next":{"headline":"Abitrary file write through systemd-creds option","id":"CVE-2026-33945"},"packages":[{"ecosystem":"npm","fixed":["20.8.8"],"introduced":["15.10.0"],"last_affected":[],"package":"happy-dom","purl":null,"source":"GHSA-6q6h-j7hj-3r64"},{"ecosystem":"npm","fixed":["20.8.8"],"introduced":["15.10.0"],"last_affected":[],"package":"happy-dom","purl":"pkg:npm/happy-dom","source":"GHSA-6q6h-j7hj-3r64"}],"prev":{"headline":"Saloon has insecure deserialization in AccessTokenAuthenticator (object injection / RCE)","id":"CVE-2026-33942"},"products":["happy-dom"],"published":"2026-03-27","related":[{"cvss_score":7.5,"headline":"Happy DOM's fetch credentials include uses page-origin cookies instead of target-origin cookies","id":"CVE-2026-34226","kev_date_added":null,"published":"2026-03-27"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-07-15","vendors":["capricorn86"]},"summary":"Attackers can achieve remote code execution by injecting malicious JavaScript into ES module export declarations processed by the Happy DOM library.","url":"https://insights.sbomify.com/CVE-2026-33943/"}