@astrojs/internal-helpers@0.0.0-markdoc-config-changes-20230626153541

Internal helpers used by core Astro packages.

  • latest version

    0.10.3

  • latest non vulnerable version

  • first published

    3 years ago

  • latest version published

    21 hours ago

  • Direct Vulnerabilities

    Known vulnerabilities in the @astrojs/internal-helpers 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
    • M
    Directory Traversal

    @astrojs/internal-helpers is an Internal helpers used by core Astro packages.

    Affected versions of this package are vulnerable to Directory Traversal in the matchPathname method. An attacker can access unauthorized paths in the /_image endpoint by crafting a remote URL that includes an allowed prefix later in the path, thereby bypassing intended path restrictions.

    How to fix Directory Traversal?

    Upgrade @astrojs/internal-helpers to version 0.7.6, 0.8.0 or higher.

    <0.7.6>=0.8.0-beta.0 <0.8.0
    • M
    Cross-site Scripting (XSS)

    @astrojs/internal-helpers is an Internal helpers used by core Astro packages.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the isRemoteAllowed function. An attacker can execute arbitrary JavaScript in the victim's browser by submitting a crafted SVG image using a data: URL, which is then processed and rendered without proper validation or sanitization.

    How to fix Cross-site Scripting (XSS)?

    Upgrade @astrojs/internal-helpers to version 0.7.5 or higher.

    <0.7.5
    • M
    Relative Path Traversal

    @astrojs/internal-helpers is an Internal helpers used by core Astro packages.

    Affected versions of this package are vulnerable to Relative Path Traversal via the href parameter in the image optimization endpoint during development mode. An attacker can access arbitrary local image files readable by the Node.js process by sending crafted HTTP requests specifying absolute file paths.

    How to fix Relative Path Traversal?

    Upgrade @astrojs/internal-helpers to version 0.7.4 or higher.

    <0.7.4
    • M
    Server-side Request Forgery (SSRF)

    @astrojs/internal-helpers is an Internal helpers used by core Astro packages.

    Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the /_image endpoint. An attacker can access internal or unauthorized resources by submitting crafted URLs to the generated image optimization endpoint configured with output: server and utilizing default imageService: compile.

    Note:

    This was partially fixed by the patch for CVE-2025-58179. That fix blocks http://, https:// and //, but can be bypassed using backslashes (\); the endpoint still issues a server-side fetch.

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

    Upgrade @astrojs/internal-helpers to version 0.7.3 or higher.

    <0.7.3
    • M
    Cross-site Scripting (XSS)

    @astrojs/internal-helpers is an Internal helpers used by core Astro packages.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the /_image endpoint. An attacker can cause loading of unauthorized third-party images, including potentially malicious SVG files, to be served by bypassing domain restrictions using protocol-relative URLs. This can lead to the execution of arbitrary scripts in the context of the affected site if a user follows a crafted link.

    Note: This vulnerability is only exploitable in projects using the @astrojs/node adapter and on-demand rendering.

    How to fix Cross-site Scripting (XSS)?

    Upgrade @astrojs/internal-helpers to version 0.7.2 or higher.

    <0.7.2