astro@6.4.3

Astro is a modern site builder with web best practices, performance, and DX front-of-mind.

  • latest version

    7.1.6

  • latest non vulnerable version

  • first published

    5 years ago

  • latest version published

    2 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the astro 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
    Cross-site Scripting (XSS)

    astro is an Astro is a modern site builder with web best practices, performance, and DX front-of-mind.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the renderHTMLElement function. An attacker can inject arbitrary event-handler attributes or sibling elements, including <script>, into the server-side rendered output by supplying maliciously crafted object keys as spread props to a native HTMLElement-subclass component.

    Note: This is only exploitable if the SSR runtime exposes a global HTMLElement (such as in Deno, Bun with a DOM shim, or jsdom/happy-dom in Node) and a class extending HTMLElement is used directly as a component that receives untrusted-keyed spread props.

    How to fix Cross-site Scripting (XSS)?

    Upgrade astro to version 7.0.6 or higher.

    <7.0.6
    • M
    Cross-site Scripting (XSS)

    astro is an Astro is a modern site builder with web best practices, performance, and DX front-of-mind.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the server-side generation of the style element when unescaped animation properties are interpolated from attacker-controlled input. An attacker can execute arbitrary JavaScript in the context of the affected application by injecting specially crafted values that break out of the style element and insert malicious scripts.

    How to fix Cross-site Scripting (XSS)?

    Upgrade astro to version 7.1.0 or higher.

    <7.1.0
    • L
    Improper Encoding or Escaping of Output

    astro is an Astro is a modern site builder with web best practices, performance, and DX front-of-mind.

    Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output via the transition:persist, transition:scope, or transition:persist-props directives when unescaped values are copied onto the rendered <astro-island> element. An attacker can inject arbitrary HTML or JavaScript into the server-rendered output by supplying crafted input that is reflected into these directives.

    Note: This is only exploitable if the application developer passes untrusted, request-derived input directly into a transition directive.

    How to fix Improper Encoding or Escaping of Output?

    Upgrade astro to version 7.0.4 or higher.

    <7.0.4
    • H
    Use of Non-Canonical URL Paths for Authorization Decisions

    astro is an Astro is a modern site builder with web best practices, performance, and DX front-of-mind.

    Affected versions of this package are vulnerable to Use of Non-Canonical URL Paths for Authorization Decisions in validateAndDecodePathname and rewrite routing in findRouteToRewrite. An attacker can reach protected routes by sending an over-encoded URL whose path is only partially decoded for middleware checks but then decoded again during route matching. This lets unauthenticated requests slip past pathname-based middleware authorization and still resolve to routes such as /admin or /api/admin. The result is unauthorized access to protected pages or APIs that the application intended to block.

    Notes

    • The bypass is only exposed in deployments that are authorized by inspecting context.url.pathname and then handing the request back into Astro’s rewrite flow with next(context.url), so middleware and routing can see different pathname representations for the same request.
    • The affected route checks are not limited to page paths; the maintainer’s advisory examples include API and other internal endpoints, so applications using pathname-based protections for non-page handlers are in scope as well.

    How to fix Use of Non-Canonical URL Paths for Authorization Decisions?

    Upgrade astro to version 6.4.8 or higher.

    <6.4.8
    • H
    Server-side Request Forgery (SSRF)

    astro is an Astro is a modern site builder with web best practices, performance, and DX front-of-mind.

    Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the prerenderedErrorPageFetch. An attacker can access sensitive information or interact with internal resources by sending a crafted request with a malicious Host header, which causes the server to fetch error pages from an attacker-controlled host and reflect the response back to the client.

    Note: This is only exploitable if the deployment uses prerendered error pages and the internal createRequestFromNodeRequest builder with app.render() without overriding the default error page fetch behavior.

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

    Upgrade astro to version 6.4.6 or higher.

    <6.4.6
    • L
    Cross-site Scripting (XSS)

    astro is an Astro is a modern site builder with web best practices, performance, and DX front-of-mind.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the addAttribute function, which interpolates unescaped object keys as HTML attribute names when spreading props onto elements. An attacker can execute arbitrary JavaScript in the victim's browser session by supplying malicious object keys that break out of the attribute context and inject event handlers or new elements.

    Note: This is only exploitable if attacker-controlled input can influence the keys of an object that is spread onto an HTML element using Astro's {...props} attribute spreading feature. This requires SSR or compromised data sources at build time.

    How to fix Cross-site Scripting (XSS)?

    Upgrade astro to version 6.4.6 or higher.

    <6.4.6