Packages

@happy-dom/jest-environment

21.0.4 · 20 Oct 2026MIT269.4k / weekRepositoryHomepagenpmAtom feed

Your version

21.0.0

major11 Oct 2026Where it was published

21.0.4 is the newest release of 21.x.

In short

1 security

Release note

:bomb: Breaking Changes

  • Security

    Disables CSS and IFrame loading by default to prevent server-side request forgery (SSRF) - By @capricorn86

    • An attacker could embed <iframe> or <link rel="stylesheet"> elements in untrusted HTML to make Happy DOM send HTTP requests from the server to attacker-chosen URLs, including internal services. This could allow access to otherwise unreachable endpoints or trigger unintended actions, depending on the application and its network access.

    • The settings property disableCSSFileLoading has been deprecated

    • Added the new settings properties enableCSSFileLoading and enableIframePageLoading

    • If you don't believe that you are at risk, you can keep the same behavior as in <=v20.14.6 by sending in { enableCSSFileLoading: true, enableIframePageLoading: true } as broswer settings (e.g. new Window({ settings }));

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.