Skip to content
Hacktron Sign in [S]

Security changelog

Astro has 28 published advisories, 7 high or critical.

When a framework publishes a security advisory, this page tracks the details teams need for patch triage: affected ranges, fixed versions, CVEs, workarounds, severity, and the original advisory. Feature releases and routine changelog noise stay out.

  1. 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.

    • >= 7.1.0, <= 7.3.2
    CVE-2026-114127
    Low

    Fixed in 7.3.3

  2. 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.

    • < 7.3.2
    CVE-2026-114128
    Medium

    Fixed in 7.3.2

  1. 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.

    • <= 7.2.3
    CVE-2026-84376
    Medium

    Fixed in 7.2.4

  2. Remote code execution through AVIF image optimization

    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.

    • < 7.2.8
    GHSA-26w7-cxv4-gfx2
    Critical

    Fixed in 7.2.8

  1. 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.

    • >= 6.4.7, < 6.4.8
    CVE-2026-59731
    High

    Fixed in 6.4.8

  2. 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.

    • >= 7.0.0, < 7.0.6
    CVE-2026-73423
    Medium

    Fixed in 7.0.6

  3. 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).

    • >= 3.10.0, < 7.0.4
    CVE-2026-59727
    Low

    Fixed in 7.0.4

  4. 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.

    • >= 2.9.0, <= 7.0.9
    CVE-2026-73422
    Medium

    Fixed in 7.1.0

  5. 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.

    • < 7.0.6
    CVE-2026-59729
    Medium

    Fixed in 7.0.6

  1. 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:

    • < 6.4.6
    CVE-2026-54299
    High

    Fixed in 6.4.6

  2. Reflected XSS via unescaped slot name

    Summary

    When a component uses a client:* directive, Astro inserts named slot content into a data-astro-template attribute without HTML escaping the slot name allowing an attacker to break out of the attribute context and inject arbitrary HTML, resulting in reflected XSS during SSR.

    This is similar to GHSA-wrwg-2hg8-v723 but exploits a different injection point.

    Vulnerable Code

    packages/astro/src/runtime/server/render/component.ts:371:376

    • < 6.3.3
    CVE-2026-50146
    High

    Fixed in 6.3.3

  3. XSS via Unescaped Attribute Names in Spread Props

    Summary

    The spreadAttributes function in Astro’s server-side rendering pipeline iterates over object keys and passes them directly to addAttribute, which interpolates the key into the HTML output without escaping.

    • < 6.4.6
    CVE-2026-54298
    Medium

    Fixed in 6.4.6

  1. Server island encrypted parameters vulnerable to cross-component replay

    Impact

    Astro versions prior to 6.1.10 used AES-GCM encryption to protect the confidentiality and integrity of server island props and slots parameters, but did not bind the ciphertext to its intended component or parameter type. An attacker could replay one component’s encrypted props (p) value as another component’s slots (s) value, or vice versa.

    • < 6.1.10
    CVE-2026-45028
    Low

    Fixed in 6.1.10

  1. XSS in define:vars via incomplete </script> tag sanitization

    Summary

    The defineScriptVars function in Astro’s server-side rendering pipeline uses a case-sensitive regex /<\/script>/g to sanitize values injected into inline <script> tags via the define:vars directive. HTML parsers close <script> elements case-insensitively and also accept whitespace or / before the closing >, allowing an attacker to bypass the sanitization with payloads like </Script>, </script >, or </script/> and inject arbitrary HTML/JavaScript.

    • < 6.1.6
    CVE-2026-41067
    Medium

    Fixed in 6.1.6

  1. Remote allowlist bypass via unanchored matchPathname wildcard

    Summary

    This issue concerns Astro’s remotePatterns path enforcement for remote URLs used by server-side fetchers such as the image optimization endpoint. The path matching logic for /* wildcards is unanchored, so a pathname that contains the allowed prefix later in the path can still match. As a result, an attacker can fetch paths outside the intended allowlisted prefix on an otherwise allowed host.

    • >= 2.10.10, < 5.18.1
    CVE-2026-33769
    Low

    Fixed in 5.18.1

  1. Astro has an Authentication Bypass via Double URL Encoding, a bypass for CVE-2025-64765

    Summary

    A double URL encoding bypass allows any unauthenticated attacker to bypass path-based authentication checks in Astro middleware, granting unauthorized access to protected routes. While the original CVE-2025-64765 (single URL encoding) was fixed in v5.15.8, the fix is insufficient as it only decodes once.

    • < 5.15.8
    CVE-2025-66202
    Medium

    Fixed in 5.15.8

  1. Astro Cloudflare adapter has Stored Cross-site Scripting vulnerability in /_image endpoint

    Summary
    A Cross-Site Scripting (XSS) vulnerability exists in Astro when using the @astrojs/cloudflare adapter with output: 'server'. The built-in image optimization endpoint (/_image) uses isRemoteAllowed() from Astro’s internal helpers, which unconditionally allows data: URLs.

    • < 5.15.9
    CVE-2025-65019
    Medium

    Fixed in 5.15.9

  2. Astro Development Server has Arbitrary Local File Read

    Summary

    A vulnerability has been identified in the Astro framework’s development server that allows arbitrary local file read access through the image optimization endpoint. The vulnerability affects Astro development environments and allows remote attackers to read any image file accessible to the Node.js process on the host system.

    Details

    • Title: Arbitrary Local File Read in Astro Development Image Endpoint
    • < 5.14.3
    CVE-2025-64757
    Low

    Fixed in 5.14.3

  3. Astro vulnerable to reflected XSS via the server islands feature

    Summary

    After some research it appears that it is possible to obtain a reflected XSS when the server islands feature is used in the targeted application, regardless of what was intended by the component template(s).

    Details

    Server islands run in their own isolated context outside of the page request and use the following pattern path to hydrate the page: /_server-islands/[name]. These paths can be called via GET or POST and use three parameters:

    • e: component to export
    • <= 5.15.6
    CVE-2025-64764
    High

    Fixed in 5.15.8

  1. Astro development server error page is vulnerable to reflected Cross-site Scripting

    Summary

    A Reflected Cross-Site Scripting (XSS) vulnerability exists in Astro’s development server error pages when the trailingSlash configuration option is used. An attacker can inject arbitrary JavaScript code that executes in the victim’s browser context by crafting a malicious URL. While this vulnerability only affects the development server and not production builds, it could be exploited to compromise developer environments through social engineering or malicious links.

    • >= 5.2.0, < 5.15.6
    CVE-2025-64745
    Low

    Fixed in 5.15.6

  2. Astro vulnerable to URL manipulation via headers, leading to middleware and CVE-2025-61925 bypass

    Summary

    In impacted versions of Astro using on-demand rendering, request headers x-forwarded-proto and x-forwarded-port are insecurely used, without sanitization, to build the URL. This has several consequences the most important of which are:

    • Middleware-based protected route bypass (only via x-forwarded-proto)
    • DoS via cache poisoning (if a CDN is present)
    • SSRF (only via x-forwarded-proto)
    • >= 2.16.0, < 5.15.5
    CVE-2025-64525
    Medium

    Fixed in 5.15.5

  1. Astro’s bypass of image proxy domain validation leads to SSRF and potential XSS

    Summary

    This is a patch bypass of CVE-2025-58179 in commit 9ecf359. The fix blocks http://, https:// and //, but can be bypassed using backslashes (\) - the endpoint still issues a server-side fetch.

    • >= 5.13.4, < 5.13.10
    CVE-2025-59837
    High

    Fixed in 5.13.10

  1. Astro’s X-Forwarded-Host is reflected without validation

    Summary

    When running Astro in on-demand rendering mode using a adapter such as the node adapter it is possible to maliciously send an X-Forwarded-Host header that is reflected when using the recommended Astro.url property as there is no validation that the value is safe.

    Details

    Astro reflects the value in X-Forwarded-Host in output when using Astro.url without any validation.

    • < 5.14.3
    CVE-2025-61925
    Medium

    Fixed in 5.14.3

  1. Astro allows unauthorized third-party images in _image endpoint

    Summary

    In affected versions of astro, the image optimization endpoint in projects deployed with on-demand rendering allows images from unauthorized third-party domains to be served.

    Details

    On-demand rendered sites built with Astro include an /_image endpoint which returns optimized versions of images.

    • <= 4.16.18
    • >= 5.0.0-alpha.0, < 5.13.2
    CVE-2025-55303
    Medium

    Fixed in 4.16.19, 5.13.2

  1. Astros’s duplicate trailing slash feature leads to an open redirection security issue

    Summary

    There is an Open Redirection vulnerability in the trailing slash redirection logic when handling paths with double slashes. This allows an attacker to redirect users to arbitrary external domains by crafting URLs such as https://mydomain.com//malicious-site.com/. This increases the risk of phishing and other social engineering attacks.

    This affects Astro >=5.2.0 sites that use on-demand rendering (SSR) with the Node or Cloudflare adapter.

    • >= 5.2.0, < 5.12.8
    CVE-2025-54793
    Medium

    Fixed in 5.12.8

  1. Astro’s server source code is exposed to the public if sourcemaps are enabled

    Summary

    A bug in the build process allows any unauthenticated user to read parts of the server source code.

    Details

    During build, along with client assets such as css and font files, the sourcemap files for the server code are moved to a publicly-accessible folder. https://github.com/withastro/astro/blob/176fe9f113fd912f9b61e848b00bbcfecd6d5c2c/packages/astro/src/core/build/static-build.ts#L139

    • <= 4.16.17
    • >= 5.0.0-alpha.0, < 5.0.8
    CVE-2024-56159
    High

    Fixed in 4.16.18, 5.0.8

  1. Atro CSRF Middleware Bypass (security.checkOrigin)

    Summary

    A bug in Astro’s CSRF-protection middleware allows requests to bypass CSRF checks.

    Details

    When the security.checkOrigin configuration option is set to true, Astro middleware will perform a CSRF check. (Source code: https://github.com/withastro/astro/blob/6031962ab5f56457de986eb82bd24807e926ba1b/packages/astro/src/core/app/middlewares.ts)

    • < 4.16.17
    CVE-2024-56140
    Medium

    Fixed in 4.16.17

  1. DOM Clobbering Gadget found in astro’s client-side router that leads to XSS

    Summary

    A DOM Clobbering gadget has been discoverd in Astro’s client-side router. It can lead to cross-site scripting (XSS) in websites enables Astro’s client-side routing and has stored attacker-controlled scriptless HTML elements (i.e., iframe tags with unsanitized name attributes) on the destination pages.

    Details

    Backgrounds

    DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g.

    • >= 3.0.0, < 4.16.1
    CVE-2024-47885
    Medium

    Fixed in 4.16.1

Contact

Book a demo or start for free.

Menu
[M]
Next in menu
[J]
Previous in menu
[K]
Find
[F]
Sign in
[S]
Copy page
[C]
Justification
[R]
Dark mode
[D]
Palette
[T]
High contrast
[H]
Shortcuts
[I]
Close
[esc]