org.mvnpm:happy-dom@20.13.2

  • latest version

    21.0.4

  • latest non vulnerable version

  • first published

    1 years ago

  • latest version published

    1 months ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the org.mvnpm:happy-dom package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • C
    Server-side Request Forgery (SSRF)

    org.mvnpm:happy-dom is a Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.

    Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via automatic loading of external resources in HTMLIFrameElement and HTMLLinkElement. When a document containing an <iframe src="..."> or <link rel="stylesheet" href="..."> element is parsed, happy-dom issues real HTTP requests to the specified URLs without any user opt-in, allowing an attacker who controls the rendered HTML to cause the server running happy-dom to make arbitrary outbound requests - including to internal network endpoints such as cloud metadata services.

    How to fix Server-side Request Forgery (SSRF)?

    Upgrade org.mvnpm:happy-dom to version 21.0.1 or higher.

    [,21.0.1)
    • M
    Reliance on Cookies without Validation and Integrity Checking

    org.mvnpm:happy-dom is a Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.

    Affected versions of this package are vulnerable to Reliance on Cookies without Validation and Integrity Checking via the cookie domain scoping logic in CookieDomainUtility and CookieURLUtility, which fails to enforce RFC 6265 domain-match rules and does not consult the Public Suffix List. An attacker-controlled server can set a cookie with a Domain attribute that is not a suffix of the request host (e.g., responding from 127.0.0.1 while claiming Domain=localhost), and happy-dom stores and forwards that cookie to the victim origin. Additionally, CookieURLUtility uses a plain endsWith check without a DNS-label boundary, so a cookie scoped to example.com is incorrectly sent to notexample.com.

    How to fix Reliance on Cookies without Validation and Integrity Checking?

    Upgrade org.mvnpm:happy-dom to version 20.14.6 or higher.

    [,20.14.6)
    • H
    Arbitrary Code Injection

    org.mvnpm:happy-dom is a Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.

    Affected versions of this package are vulnerable to Arbitrary Code Injection via the ESM compiler (ECMAScriptModuleCompiler.ts), which fails to validate import alias default-value expressions in ES module source text before passing them to an evaluator. An attacker who can cause a page to load a module script containing an import binding with an injected default-value expression (e.g. import { missing as x = <arbitrary JS> } from '...') can achieve arbitrary code execution on the host Node.js process, including access to the filesystem through process.getBuiltinModule.

    How to fix Arbitrary Code Injection?

    Upgrade org.mvnpm:happy-dom to version 21.0.4 or higher.

    [18.0.1,21.0.4)