astro

Ecosystem: npm

Downloads: 36.31 Mln

Vulnerabilities from the last (months)
  • 1CriticalAffects 1 version
  • 6HighAffects 7 versions
  • 0MediumAffects 0 versions
  • 16ModerateAffects 17 versions
  • 6LowAffects 6 versions
Severity distribution (all time)
29vulnerabilities
  • Critical1 (3.4%)
  • High6 (20.7%)
  • Medium0 (0.0%)
  • Moderate16 (55.2%)
  • Low6 (20.7%)

Monthly breakdown

  • Critical
  • High
  • Medium
  • Moderate
  • Low
  • 2 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 1
  • 2 vulnerabilities
    • Critical: 1
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 5 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 3
    • Low: 1
  • 3 vulnerabilities
    • Critical: 0
    • High: 2
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 0
    • Low: 1
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 0
    • Low: 1
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 6 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 3
    • Low: 2
  • 2 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 2 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 2
    • Low: 0
  • 2 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0

Vulnerabilities (29)

Known vulnerabilities affecting astro, based on data from OSV.

Vulnerabilities affecting astro
IDSeveritySummaryAffected versionsPublishedSource
GHSA-98hj-9722-w3j8ModerateAstro: Reflected/Stored XSS via unescaped <script>/<style> tag content in JSX/MDX rendering## Summary Astro's JSX and MDX rendering pipeline treated string children of `<script>` and `<style>` elements as trusted HTML. When a dynamic value was passed through a JSX expression, such as `<script>{value}</script>`, an attacker-controlled value containing `</script>` or `</style>` could terminate the element and inject arbitrary HTML and JavaScript. Other JSX expression contexts escaped dynamic strings automatically. This behavior was limited to `<script>` and `<style>` children rendered through Astro's `astro:jsx` renderer, including MDX components. ## Details The affected rendering
  • < 7.3.2
GitHub (opens in a new tab)
GHSA-mpr7-6m5w-76rwLowAstro: Arbitrary CSS injection in Astro View Transitions### Summary Astro's server-side View Transition CSS generator did not keep string animation properties within their generated CSS declarations. In an application that passes attacker-controlled data into an animation property such as `duration`, a value containing CSS delimiters could terminate the declaration and rule, then add attacker-selected CSS to the server-rendered page. The injected content remains inside the generated `<style>` element. It cannot terminate that element or inject HTML or JavaScript because Astro escapes `<` before emitting the stylesheet. ### Severity Exploitation
  • >= 7.1.0, < 7.3.3
GitHub (opens in a new tab)
GHSA-26w7-cxv4-gfx2CriticalAstro: Remote code execution through AVIF image optimizationA vulnerability in `libheif`, used by the default Sharp image service in Astro, can lead to remote code execution when a malicious AVIF image is optimized. Projects are affected when an attacker can cause Astro to process an untrusted AVIF image. The fix was released in Astro 7.2.8, which requires Sharp 0.35.4.
  • < 7.2.8
GitHub (opens in a new tab)
GHSA-376h-93r7-7g6fModerateAstro: Authorization bypass from missing path-segment boundary check when stripping the configured base## Summary Astro stripped a configured `base` path from request pathnames using a string-prefix check that did not verify a path-segment boundary. With `base: "/app"`, a request to `/appX/admin` was treated as being under the base and resolved internally to the `/admin` route, while middleware still observed the public pathname `/appX/admin`. Middleware that authorizes routes by inspecting `context.url.pathname` could therefore be bypassed. ## Impact An unauthenticated remote attacker can bypass pathname-based middleware authorization in applications that: - Configure a non-root `base`. -
  • < 7.2.4
GitHub (opens in a new tab)
GHSA-4g3v-8h47-v7g6ModerateAstro: Reflected XSS via unescaped View Transition animation properties## Summary Astro's server-side View Transition CSS generator interpolates animation properties into an inline `<style>` element without escaping them for the CSS and HTML contexts. An attacker-controlled value passed to an animation property such as `duration` can contain a `</style>` sequence, terminate the generated style element, and inject arbitrary HTML or JavaScript. This is similar to GHSA-8hv8-536x-4wqp, but exploits a different injection point: unescaped View Transition animation values in a server-generated `<style>` element rather than an unescaped slot name in a hydration templa
  • >= 2.9.0, < 7.1.0
GitHub (opens in a new tab)
GHSA-7pw4-f3q4-r2p2LowAstro: Cross-site scripting via unescaped transition:* directive values on hydrated islands### Summary When a `transition:persist`, `transition:scope`, or `transition:persist-props` directive is applied to a client-hydrated (`client:*`) component, Astro copied the directive value onto the rendered `<astro-island>` element **without HTML-escaping it**. If a developer reflects attacker-controlled input into one of these directives, an attacker can break out of the attribute and inject arbitrary HTML/JavaScript into the server-rendered output, resulting in reflected cross-site scripting (XSS). ### Severity Although a generic reflected XSS scores in the Medium range, exploitation her
  • >= 3.10.0, < 7.0.4
GitHub (opens in a new tab)
GHSA-8mv7-9c27-98vcModerateAstro: composable `astro/hono` pipeline bypasses `security.checkOrigin` when `middleware()` is absent or misordered## Summary In the composable `astro/hono` pipeline, the `security.checkOrigin` protection is only installed by the `middleware()` primitive. The `actions()` and `pages()` primitives each dispatch to user code independently, so a pipeline that mounts either primitive before (or without) `middleware()` will bypass the origin check for those requests. ## Details `security.checkOrigin` (default: `true`) is intended to reject cross-site `POST`/`PUT`/`PATCH`/`DELETE` form submissions. In the classic pipeline (`astro()` all-in-one), the check always runs because Astro injects a virtual middleware
  • >= 7.0.0, < 7.0.6
GitHub (opens in a new tab)
GHSA-f48w-9m4c-m7f5ModerateAstro: XSS via unescaped spread attribute names in renderHTMLElement (incomplete fix for CVE-2026-54298)## Summary The fix for CVE-2026-54298 (GHSA-jrpj-wcv7-9fh9) added an `INVALID_ATTR_NAME_CHAR` guard to `addAttribute()` so that spread-prop attribute names containing `"' >/=` or whitespace are dropped. A second attribute-rendering path, `renderHTMLElement()` in `packages/astro/src/runtime/server/render/dom.ts`, has its own inline attribute loop that does not go through `addAttribute()` and was not updated. It interpolates the attribute name unescaped and only escapes the value, so untrusted prop keys spread onto a native-`HTMLElement`-subclass component can still break out of the attribute c
  • < 7.0.6
GitHub (opens in a new tab)
GHSA-vj59-8hwv-xxmvHighAstro: Authorization Bypass via Decode Iteration Limit and Rewrite Path Canonicalization Mismatch# Astro 6.4.7 Authorization Bypass via Decode Iteration Limit and Rewrite Path Canonicalization Mismatch ## Summary Astro 6.4.7 appears to reintroduce a middleware authorization bypass pattern when a request path is encoded more deeply than the newly introduced iterative URL decoder's maximum decoding depth. The issue occurs because Astro performs authorization decisions on a partially decoded pathname after reaching a decoding iteration cap, while later route matching logic performs an additional `decodeURI()` operation and resolves the request to a protected route. As a result, middlewar
  • >= 6.4.7, < 6.4.8
GitHub (opens in a new tab)
GHSA-2pvr-wf23-7pc7HighAstro: Host header SSRF in prerendered error page fetch## Summary Astro SSR apps with prerendered error pages (`/404` or `/500` using `export const prerender = true`) fetch those pages over HTTP at runtime when an error occurs. The URL for this fetch is derived from `request.url`, which in turn gets its origin from the incoming `Host` header. When the `Host` header is not validated against `allowedDomains`, an attacker can point the fetch at an arbitrary host and read the response. ## Who is affected This affects SSR deployments that: 1. Have a prerendered 404 or 500 page 2. Use `createRequestFromNodeRequest` from `astro/app/node` with `app.re
  • < 6.4.6
GitHub (opens in a new tab)
  • GHSA-98hj-9722-w3j8Moderate
    Astro: Reflected/Stored XSS via unescaped <script>/<style> tag content in JSX/MDX rendering
    • < 7.3.2

    ## Summary Astro's JSX and MDX rendering pipeline treated string children of `<script>` and `<style>` elements as trusted HTML. When a dynamic value was passed through a JSX expression, such as `<script>{value}</script>`, an attacker-controlled value containing `</script>` or `</style>` could terminate the element and inject arbitrary HTML and JavaScript. Other JSX expression contexts escaped dynamic strings automatically. This behavior was limited to `<script>` and `<style>` children rendered through Astro's `astro:jsx` renderer, including MDX components. ## Details The affected rendering

    CVE: CVE-2026-114128

  • GHSA-mpr7-6m5w-76rwLow
    Astro: Arbitrary CSS injection in Astro View Transitions
    • >= 7.1.0, < 7.3.3

    ### Summary Astro's server-side View Transition CSS generator did not keep string animation properties within their generated CSS declarations. In an application that passes attacker-controlled data into an animation property such as `duration`, a value containing CSS delimiters could terminate the declaration and rule, then add attacker-selected CSS to the server-rendered page. The injected content remains inside the generated `<style>` element. It cannot terminate that element or inject HTML or JavaScript because Astro escapes `<` before emitting the stylesheet. ### Severity Exploitation

    CVE: CVE-2026-114127

  • GHSA-26w7-cxv4-gfx2Critical
    Astro: Remote code execution through AVIF image optimization
    • < 7.2.8

    A vulnerability in `libheif`, used by the default Sharp image service in Astro, can lead to remote code execution when a malicious AVIF image is optimized. Projects are affected when an attacker can cause Astro to process an untrusted AVIF image. The fix was released in Astro 7.2.8, which requires Sharp 0.35.4.

  • GHSA-376h-93r7-7g6fModerate
    Astro: Authorization bypass from missing path-segment boundary check when stripping the configured base
    • < 7.2.4

    ## Summary Astro stripped a configured `base` path from request pathnames using a string-prefix check that did not verify a path-segment boundary. With `base: "/app"`, a request to `/appX/admin` was treated as being under the base and resolved internally to the `/admin` route, while middleware still observed the public pathname `/appX/admin`. Middleware that authorizes routes by inspecting `context.url.pathname` could therefore be bypassed. ## Impact An unauthenticated remote attacker can bypass pathname-based middleware authorization in applications that: - Configure a non-root `base`. -

    CVE: CVE-2026-84376

  • GHSA-4g3v-8h47-v7g6Moderate
    Astro: Reflected XSS via unescaped View Transition animation properties
    • >= 2.9.0, < 7.1.0

    ## Summary Astro's server-side View Transition CSS generator interpolates animation properties into an inline `<style>` element without escaping them for the CSS and HTML contexts. An attacker-controlled value passed to an animation property such as `duration` can contain a `</style>` sequence, terminate the generated style element, and inject arbitrary HTML or JavaScript. This is similar to GHSA-8hv8-536x-4wqp, but exploits a different injection point: unescaped View Transition animation values in a server-generated `<style>` element rather than an unescaped slot name in a hydration templa

    CVE: CVE-2026-73422

  • GHSA-7pw4-f3q4-r2p2Low
    Astro: Cross-site scripting via unescaped transition:* directive values on hydrated islands
    • >= 3.10.0, < 7.0.4

    ### Summary When a `transition:persist`, `transition:scope`, or `transition:persist-props` directive is applied to a client-hydrated (`client:*`) component, Astro copied the directive value onto the rendered `<astro-island>` element **without HTML-escaping it**. If a developer reflects attacker-controlled input into one of these directives, an attacker can break out of the attribute and inject arbitrary HTML/JavaScript into the server-rendered output, resulting in reflected cross-site scripting (XSS). ### Severity Although a generic reflected XSS scores in the Medium range, exploitation her

    CVE: CVE-2026-59727

  • GHSA-8mv7-9c27-98vcModerate
    Astro: composable `astro/hono` pipeline bypasses `security.checkOrigin` when `middleware()` is absent or misordered
    • >= 7.0.0, < 7.0.6

    ## Summary In the composable `astro/hono` pipeline, the `security.checkOrigin` protection is only installed by the `middleware()` primitive. The `actions()` and `pages()` primitives each dispatch to user code independently, so a pipeline that mounts either primitive before (or without) `middleware()` will bypass the origin check for those requests. ## Details `security.checkOrigin` (default: `true`) is intended to reject cross-site `POST`/`PUT`/`PATCH`/`DELETE` form submissions. In the classic pipeline (`astro()` all-in-one), the check always runs because Astro injects a virtual middleware

    CVE: CVE-2026-73423

  • GHSA-f48w-9m4c-m7f5Moderate
    Astro: XSS via unescaped spread attribute names in renderHTMLElement (incomplete fix for CVE-2026-54298)
    • < 7.0.6

    ## Summary The fix for CVE-2026-54298 (GHSA-jrpj-wcv7-9fh9) added an `INVALID_ATTR_NAME_CHAR` guard to `addAttribute()` so that spread-prop attribute names containing `"' >/=` or whitespace are dropped. A second attribute-rendering path, `renderHTMLElement()` in `packages/astro/src/runtime/server/render/dom.ts`, has its own inline attribute loop that does not go through `addAttribute()` and was not updated. It interpolates the attribute name unescaped and only escapes the value, so untrusted prop keys spread onto a native-`HTMLElement`-subclass component can still break out of the attribute c

    CVE: CVE-2026-59729

  • GHSA-vj59-8hwv-xxmvHigh
    Astro: Authorization Bypass via Decode Iteration Limit and Rewrite Path Canonicalization Mismatch
    • >= 6.4.7, < 6.4.8

    # Astro 6.4.7 Authorization Bypass via Decode Iteration Limit and Rewrite Path Canonicalization Mismatch ## Summary Astro 6.4.7 appears to reintroduce a middleware authorization bypass pattern when a request path is encoded more deeply than the newly introduced iterative URL decoder's maximum decoding depth. The issue occurs because Astro performs authorization decisions on a partially decoded pathname after reaching a decoding iteration cap, while later route matching logic performs an additional `decodeURI()` operation and resolves the request to a protected route. As a result, middlewar

    CVE: CVE-2026-59731

  • GHSA-2pvr-wf23-7pc7High
    Astro: Host header SSRF in prerendered error page fetch
    • < 6.4.6

    ## Summary Astro SSR apps with prerendered error pages (`/404` or `/500` using `export const prerender = true`) fetch those pages over HTTP at runtime when an error occurs. The URL for this fetch is derived from `request.url`, which in turn gets its origin from the incoming `Host` header. When the `Host` header is not validated against `allowedDomains`, an attacker can point the fetch at an arbitrary host and read the response. ## Who is affected This affects SSR deployments that: 1. Have a prerendered 404 or 500 page 2. Use `createRequestFromNodeRequest` from `astro/app/node` with `app.re

    CVE: CVE-2026-54299

Showing 1-10 of 29 vulnerabilities