astro
- 7.4.1 is the latest, published 19 October 2026.
- 27 security advisories, all fixed.
- 7.x: 39 releases since 22 June 2026, 25 in the last 90 days.
Security advisories
Grouped by the version that fixes them, so one upgrade reads as one step.
Fixed in 7.2.8 · 1 advisory
- CRITICALAstro: Remote code execution through AVIF image optimizationGHSA-26w7-cxv4-gfx2
Fixed in 7.2.4 · 1 advisory
- MODERATEAstro: Authorization bypass from missing path-segment boundary check when stripping the configured baseGHSA-376h-93r7-7g6f
Fixed in 7.1.0 · 1 advisory
- MODERATEAstro: Reflected XSS via unescaped View Transition animation propertiesGHSA-4g3v-8h47-v7g6
Fixed in 7.0.6 · 2 advisories
18 older fixes
Fixed in 7.0.4 · 1 advisory
Fixed in 6.4.8 · 1 advisory
Fixed in 6.4.6 · 2 advisories
- HIGHAstro: Host header SSRF in prerendered error page fetchGHSA-2pvr-wf23-7pc7
- MODERATEAstro: XSS via Unescaped Attribute Names in Spread PropsGHSA-jrpj-wcv7-9fh9
Fixed in 6.3.3 · 1 advisory
- HIGHAstro: Reflected XSS via unescaped slot nameGHSA-8hv8-536x-4wqp
Fixed in 6.1.10 · 1 advisory
- LOWAstro: Server island encrypted parameters vulnerable to cross-component replayGHSA-xr5h-phrj-8vxv
Fixed in 6.1.6 · 1 advisory
- MODERATEAstro: XSS in define:vars via incomplete </script> tag sanitizationGHSA-j687-52p2-xcff
Fixed in 5.18.1 · 1 advisory
- LOWAstro: Remote allowlist bypass via unanchored matchPathname wildcardGHSA-g735-7g2w-hh3f
Fixed in 5.15.9 · 1 advisory
- MODERATEAstro Cloudflare adapter has Stored Cross-site Scripting vulnerability in /_image endpointGHSA-fvmw-cj7j-j39q
Fixed in 5.15.8 · 3 advisories
- HIGHAstro vulnerable to reflected XSS via the server islands featureGHSA-wrwg-2hg8-v723
- MODERATEAstro's middleware authentication checks based on url.pathname can be bypassed via url encoded valuesGHSA-ggxq-hp9w-j794
- MODERATEAstro has an Authentication Bypass via Double URL Encoding, a bypass for CVE-2025-64765GHSA-whqg-ppgf-wp8c
Fixed in 5.15.6 · 1 advisory
- LOWAstro development server error page is vulnerable to reflected Cross-site ScriptingGHSA-w2vj-39qv-7vh7
Fixed in 5.15.5 · 1 advisory
- MODERATEAstro vulnerable to URL manipulation via headers, leading to middleware and CVE-2025-61925 bypassGHSA-hr2q-hp5q-x767
Fixed in 5.14.3 · 2 advisories
- MODERATEAstro's `X-Forwarded-Host` is reflected without validationGHSA-5ff5-9fcw-vg88
- LOWAstro Development Server has Arbitrary Local File ReadGHSA-x3h8-62x9-952g
Fixed in 5.13.10 · 1 advisory
- HIGHAstro's bypass of image proxy domain validation leads to SSRF and potential XSSGHSA-qcpr-679q-rhm2
Fixed in 5.13.2 · 1 advisory
- MODERATEAstro allows unauthorized third-party images in _image endpointGHSA-xf8x-j4p2-f749
Fixed in 5.12.8 · 1 advisory
- MODERATEAstros's duplicate trailing slash feature leads to an open redirection security issueGHSA-cq8c-xv66-36gw
Fixed in 5.0.8 · 1 advisory
- HIGHAstro's server source code is exposed to the public if sourcemaps are enabledGHSA-49w6-73cw-chjr
Fixed in 4.16.17 · 1 advisory
- MODERATEAtro CSRF Middleware Bypass (security.checkOrigin)GHSA-c4pw-33h3-35xw
Fixed in 4.16.1 · 1 advisory
- MODERATEDOM Clobbering Gadget found in astro's client-side router that leads to XSSGHSA-m85w-3h95-hcf9
Releases in the last 90 days
Feed of releases and advisoriesEvery stable release, newest first. Notes are quoted as the maintainers published them.
7.4.1
19 October 2026Preserves the last modified date of cached optimized images and incrementally restored build output when copying them into the build output on all platforms
Patch Changes
Preserves the last modified date of cached optimized images and incrementally restored build output when copying them into the build output on all platforms
Fixes a typo in the error message shown when a font
cssVariableis invalidFixes a bug where projects whose path contains an apostrophe (
') failed to load sessions, middleware, a cache provider, or asrc/fetch.tshandlerFixes a
TSCONFIG_ERRORduringastro buildwhen a parent directory contains atsconfig.jsonthat cannot be resolved, such as one extendingastro/tsconfigs/strictwithout installed dependenciesFixes an
Unterminated stringbuild error when application code imports fromastro/config(for example,fontProvidersin a shared fonts module)Fixes missing styles in production builds for conditionally rendered framework components (e.g. Svelte components inside
{#if}blocks) imported by a hydrated islandFixes style-only HMR in
.astrocomponents falling back to a full page reload when a PostCSS plugin (such as@unocss/postcss) lists the component as a dependency of its own styleFixes increasing memory usage when editing the Astro configuration while the dev server is running
7.4.0
15 October 2026Adds a new --timings flag to astro build to help you find what slows down your buildsWhen a build takes longer than expected, it can be hard to tell whether the cause is an integration, a Markdown processor plugin, image processing, or even syntax highlighting. Add the --timings flag to your build command to print a summary once the build finishes:astro build --timingsThis is helpful to decide what to optimize first, or to compare build times before and after a change to your project.
Minor Changes
Adds a new
--timingsflag toastro buildto help you find what slows down your buildsWhen a build takes longer than expected, it can be hard to tell whether the cause is an integration, a Markdown processor plugin, image processing, or even syntax highlighting. Add the
--timingsflag to your build command to print a summary once the build finishes:astro build --timings
This is helpful to decide what to optimize first, or to compare build times before and after a change to your project.
Adds a new optional
getFontProperties()callback to font providersFont providers can now expose the weights, styles, subsets and formats a font family actually has. Astro uses it when resolving your font configuration to warn about values a provider cannot serve, for example a weight a font family does not offer.
All built-in providers implement it. If you maintain a custom font provider, implementing this callback is optional for now but it will be required in Astro 8:
import type { FontProvider } from 'astro'; const provider: FontProvider = { name: 'my-provider', resolveFont: ({ familyName }) => { // ... }, getFontProperties: ({ familyName }) => ({ weights: ['400', '700'], styles: ['normal', 'italic'], subsets: ['latin'], formats: ['woff2'], }), };Adds a
fetch()function to the font providerinit()contextThis function requests a provider API, retrying transient failures and more. It lets providers that wrap a 3rd-party unifont provider pass the context to it directly:
import type { FontProvider } from 'astro'; import type { InitializedProvider } from 'unifont'; import { acmeProvider } from '@acme/unifont-provider'; export function acmeFontProvider(): FontProvider { const provider = acmeProvider(); let initializedProvider: InitializedProvider | undefined; return { name: provider._name, async init(context) { initializedProvider = await provider(context); }, // ... }; }Adds
experimental.redirectPage, letting you provide your ownsrc/pages/3xx.astroin place of the redirect page Astro generates in static builds.A static site has no server to send an HTTP
Locationheader, so Astro generates a small HTML page with a<meta http-equiv="refresh">tag for each redirect it builds:Your
redirectsentriesAstro.redirect()calls in prerendered pagesi18n redirects
That page's markup, wording, and refresh delay were fixed, so you could not brand or translate it.
To enable this feature, add the experimental flag to your Astro config:
// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ experimental: { redirectPage: true, }, });Then create
src/pages/3xx.astro. Astro renders it once per redirect, passing that redirect's details as props:--- // src/pages/3xx.astro import type { RedirectPageProps as Props } from 'astro'; const { from, to, status, delay } = Astro.props; --- <html lang="en"> <head> <meta http-equiv="refresh" content={`${delay};url=${to}`} /> <meta name="robots" content="noindex" /> <title>Redirecting…</title> </head> <body> <p>This page has moved. <a href={to}>Continue to {to}</a>.</p> </body> </html>Your page must render a
<meta http-equiv="refresh">tag pointing atto, because in a static build that tag is the redirect. Astro logs a warning during the build if it is missing.See the experimental redirect page documentation for more information.
Adds a
notFound()handler toastro/fetchandastro/honothat renders the custom 404 page when no route matches, including a prerendered404.astroAdd it before
pages()in a custom worker or server entrypoint that does not run insideApp.render, such as a Hono app used directly as a Cloudflare worker. Without it,pages()andmiddleware()return an empty 404 with an internalX-Astro-Errorheader for unmatched routes.astro()already includes this handling.import { Hono } from 'hono'; import { notFound, pages } from 'astro/hono'; import { cf } from '@astrojs/cloudflare/hono'; const app = new Hono(); app.use(cf()); app.use(notFound()); app.use(pages()); export default app;Adds support for separate
buildandruntimeimage servicesimage.servicenow also accepts abuildand aruntimeservice. Thebuildservice optimizes images on prerendered pages when you build your site, and is also used during development. Theruntimeservice handles images on on-demand rendered pages and the image endpoint of your deployed site.The following example uses Sharp to optimize images on prerendered pages, and an image CDN for on-demand rendered pages:
// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ image: { service: { build: { entrypoint: 'astro/assets/services/sharp' }, runtime: { entrypoint: 'my-image-cdn-service' }, }, }, });
Changes for integration authors
config.image.servicekeeps the shape the user configured it with. When a project setsbuildandruntimeservices,config.image.service.entrypointandconfig.image.service.configareundefined.If your integration reads
image.service, check for theruntimeproperty to get the service you need:'astro:config:done': ({ config }) => { const { service } = config.image; const runtimeService = 'runtime' in service ? service.runtime : service; if (runtimeService.entrypoint === 'astro/assets/services/sharp') { // ... } },Setting
image.servicewithupdateConfig()replaces the existing service instead of merging with it when the two use different shapes. For example, setting a single service in a project that usesbuildandruntimeservices replaces both.Increases the minimum Node.js version to 22.22.0
The minimum supported Node.js version is now 22.22.0, the latest Node.js 22 release supported by StackBlitz. This change is in line with Astro's Node.js support policy.
Allows integrations to control where Astro writes client, server, and prerender build output.
Custom prerenderers can access the final output locations through the new
outputDirectoriescontext:setPrerenderer((defaultPrerenderer, { outputDirectories }) => { const { client, server, prerender } = outputDirectories return createPrerenderer({ defaultPrerenderer, client, server, prerender, }) })Lets custom prerenderers report the images used on prerendered pages
Astro now generates images on prerendered pages from the image information that a prerenderer's
getStaticPaths()andrender()return. If your prerenderer wraps Astro's default one, pass this information through:setPrerenderer((defaultPrerenderer) => ({ name: 'my-prerenderer', async setup() { await defaultPrerenderer.setup?.(); }, async getStaticPaths() { const result = await defaultPrerenderer.getStaticPaths(); const { paths, metadata } = Array.isArray(result) ? { paths: result } : result; return { paths: paths.filter(({ pathname }) => !pathname.startsWith('/drafts')), metadata }; }, render(request, options) { return defaultPrerenderer.render(request, options); }, async teardown() { await defaultPrerenderer.teardown?.(); }, }));Returning a plain array from
getStaticPaths()or a plainResponsefromrender()still works, but is deprecated: images used on those pages are not generated.Adds support for experimental parallel prerendering
This experimental feature makes
astro buildrender your static pages in parallel, using multiple CPU cores at once instead of one. On sites with many pages, this can significantly reduce build times, at the cost of higher memory usage.To enable this feature, add the experimental flag in your Astro config:
// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ experimental: { parallelPrerender: true, }, });By default, Astro uses all available CPU cores but one. Each additional worker increases the memory used by your build. If your build runs out of memory, or does not get faster, set
workersto a lower number:// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ experimental: { parallelPrerender: { workers: 4, }, }, });Each worker renders as many pages at once as your
build.concurrencysetting allows.This feature has no effect when your adapter provides its own way of prerendering pages. Among official adapters, this only applies to
@astrojs/cloudflare. Astro logs a warning during the build when the flag is ignored.For more information on enabling and using this feature in your project, see the experimental parallel prerendering docs.
Patch Changes
Fixes deployment integrations being unable to use Vite manifests when preparing build output
Fixes the JSDoc for CSP utilities to point to the render context reference in docs.
Replaces internal use of
find-procwithtinyps.Fixes prerender errors being silently swallowed when using a custom
src/fetch.tswith an adapter that prerenders in its own runtime, such as@astrojs/cloudflare. Previously, a page that threw during prerendering was written as an empty HTML file and the build succeeded. The build now fails with the underlying error.Fixes original images being kept despite only
widthorheightbeing read.Fixes
glob()loader swallowing rendering errors during content sync, which allowedastro buildto exit successfully (code 0) even when a remark/rehype plugin threw an errorFixes the
synccommand description inastro help, which only mentioned content collections.
7.3.8
8 October 2026Fixes Astro.cache being undefined when a custom 404 or 500 page is rendered by the error handler, for example after a request to an API route with an HTTP method the route doesn't export
Patch Changes
Fixes
Astro.cachebeingundefinedwhen a custom 404 or 500 page is rendered by the error handler, for example after a request to an API route with an HTTP method the route doesn't exportFixes
astro addremoving existingallowBuildsapprovals frompnpm-workspace.yamlwith pnpm v11.0–v11.22Refactors internal bundling and code transforms to use Vite's Oxc-based
transformWithOxcand Rolldown instead of esbuild. These packages no longer depend on esbuild directly.Fixes the
glob()loader not reloading changed files in dev when the pattern starts with an extglob such as!(drafts)/**/*.md
7.3.7
7 October 2026Fixes a build error when a Markdown content collection entry loaded with glob({ deferRender: true }) has a layout frontmatter property. layout is now ignored for content collection entries, as documented.
Patch Changes
Fixes a build error when a Markdown content collection entry loaded with
glob({ deferRender: true })has alayoutfrontmatter property.layoutis now ignored for content collection entries, as documented.Fixes
astro add cloudflarefailing to install dependencies with pnpm v11+ by approving theworkerdbuild script, and shows the package manager's error output whenastro addfails to install dependenciesFixes an issue where AVIF images were served as
image/heifinstead ofimage/avifin the dev server.Fixes the
cache()handler fromastro/honoandastro/fetchthrowing aTypeErrorwhen a cache provider is configured. It now registers the cache provider before rendering, soAstro.cacheis available to downstream handlers likepages().Fixes
security.checkOriginrejecting cross-origin requests with non-form content types such asapplication/json. As documented, the check only applies to unsafe requests that have nocontent-typeheader or one ofapplication/x-www-form-urlencoded,multipart/form-data, ortext/plain.
7.3.6
6 October 2026Fixes an intermittent dev server crash when using astro:actions inside a server island with adapters that use a pre-bundled SSR environment (e.g. @astrojs/cloudflare)
Patch Changes
Fixes an intermittent dev server crash when using
astro:actionsinside a server island with adapters that use a pre-bundled SSR environment (e.g.@astrojs/cloudflare)Fixes stale scoped styles during HMR when both markup and
<style>are changed in a single saveFixes CSS from other pages leaking into a page's
<head>in dev when the page imports a module such asastro:config/server.Fixes a bug where server islands containing framework components rendered empty in the dev server when using a custom
src/fetch.tsFixes the composable
i18n()handler fromastro/fetchandastro/honoreturning an empty 404 for paths without a locale prefix. It now renders the custom 404 page, matchingastro().Fixes CSS Module HMR in dev when a component is rendered both with and without hydration on the same page. Astro now uses path-based class name hashing in dev mode so that editing CSS declarations no longer changes the generated selectors, allowing Vite's CSS HMR to update styles without a full page reload.
Fixes
context.propsbeingnullin middleware and endpoints when the composableastro/honoorastro/fetchactions()handler runs beforemiddleware(), or whenpages()runs withoutmiddleware()Fixes
astro buildfailing on Windows with Node.js 25+ withERR_INVALID_ARG_VALUEwhen clearing the output directory hits a transientEPERMerrorFixes type errors reported in Astro's built-in
<Picture />and<Font />components when type-checking a project withtscand@astrojs/ts-content-mapperFixes lost request state when Vite discovers server dependencies during a request in Cloudflare dev mode
Fixes CSS imported from an
injectScript('page')script being dropped during buildFixes a hang when a
server:defercomponent is inside a slot of another component in an MDX content collection entryFixes the
glob()loader skipping content files whose paths contain#or?Fixes a bug where page routes added with
injectRoute()returned a 404 wheni18n.routing.prefixDefaultLocalewastrueand the route path had no locale prefixFixes content collection changes being ignored in
astro devafter the dev server restarts because of a config changeFixes
Astro.cookies.get()returningundefinedfor request cookies with empty valuesFixes nondeterministic ordering of the server manifest's
assetsarray, ensuring builds with identical inputs produce byte-identical outputAdds YAML parsing with timestamp and merge key support, and formats YAML errors consistently across Astro, Markdown, MDX, and Markdoc.
Improves CSRF protection by taking modern browsers headers into account
Fixes a runtime
ReferenceErrorfor inlined scripts that import a URL with/* @vite-ignore */.Astro now inlines scripts after Vite replaces its preload markers, so ignored dynamic imports can remain inline without shipping an unresolved
__VITE_PRELOAD__reference.Fixes custom View Transition direction names that are not valid CSS identifiers, such as names starting with a digit or containing spaces. These directions now match their animations correctly.
Fixes a 404 for a CSS file that a dynamic import preloads when the imported module uses a component that is also a hydrated island on the same page
Fixes duplicate CSS in production builds when a component is both server-rendered and used with
client:onlyon the same pageFixes the composable
astro/fetchandastro/honohandlers (trailingSlash(),redirects(),actions(),middleware(), andpages()) so they reject over-encoded request paths with a400 Bad Request, matchingastro(). For these requests,redirects()andactions()return the400response instead ofundefined, so no redirect is issued and no action runs.Fixes
Astro.rewrite()andcontext.rewrite()selecting the wrong route inastro devwhen two dynamic routes match the same pathAllows Astro CLI commands to install tagged package versions
Fixes a dev server dependency scan failure when an
.astrofile contains a literal<scriptin frontmatter or a template expressionFixes Astro on StackBlitz and other WebContainer environments
Fixes a
MODULE_LEVEL_DIRECTIVEwarning during build caused by a stale"use astro:head-inject"directive in content collection propagated asset modules
7.3.5
24 September 2026Adds a new container function called renderComponent(), which renders Astro components with inlined styles and scripts.Users must import the component with the new ?container query string:import { experimental_AstroContainer } from "astro/container";
Patch Changes
Adds a new container function called
renderComponent(), which renders Astro components with inlined styles and scripts.Users must import the component with the new
?containerquery string:import { experimental_AstroContainer } from "astro/container"; import TodoList from "../components/TodoList.astro?container"; const container = await experimental_AstroContainer.create(); const _string = container.renderComponent(TodoList);
7.3.4
22 September 2026Fixes incremental builds repeatedly rendering unchanged pages when modules or compiled CSS reference bundled assets.
Patch Changes
Fixes incremental builds repeatedly rendering unchanged pages when modules or compiled CSS reference bundled assets.
Improves the
astro checkerror shown for TypeScript 7. The command now explains that TypeScript 7 is not currently supported and provides instructions for experimentally type-checking Astro files with TypeScript 7.1 and@astrojs/ts-content-mapper.Fix double-escaped ampersands in Markdown image
altandtitleattributes. The__ASTRO_IMAGE_round-trip now decodes the numeric (&) and named (&) character references the Markdown processors emit, so an&in an alt or title is escaped exactly once in the final HTML instead of twice.Fix three error names that did not match their documented reference.
MissingLocale,MissingIndexForInternationalizationandNoManifestAvailablereported names ending inErrorin the dev overlay, while their error reference pages are published under the unsuffixed names, so the name shown to users could not be found in the docs.Fixes the dev server re-evaluating the whole server module graph on every request. The
astro:head-metadataplugin invalidated its component metadata virtual module from its owntransformhook, so each evaluation of that module scheduled the next one. Adapters that run requests outside Vite's module runner, such as@astrojs/cloudflare, paid for a full re-evaluation of the server graph on every request for the lifetime of the process.Fixes domain-based i18n routing to respect
security.allowedDomainswhen selecting a locale from request host headersFixes
image.responsiveStylesemitting invalidobject-positionCSS values for same-axis keyword pairs (top bottom,left right, etc.)Runs
astro devandastro previewin the foreground when an AI agent is detected on Windows, allowing the agent to manage the process lifetime. Pass--backgroundexplicitly to request an Astro-managed background process. Agent-inferred backgrounding remains enabled on other platforms.
7.3.3
16 September 2026Refactors internal version handling to use a smaller, ESM-native dependency
Patch Changes
Refactors internal version handling to use a smaller, ESM-native dependency
Returns appropriate 400 and 404 responses from the image endpoint for invalid and missing local image paths
Fixes
Astro.preferredLocaleListreturning an empty list when a locale is configured with the object form ({ path, codes }) and the browser sends the code with different casing or an underscore, such asen-USmatching a configureden-usFixes
astro preview --ignore-lock(andastro dev --ignore-lock) being refused when run from an AI agent environment. The flag now starts the server in the foreground instead of erroring, since agent detection only inferred background mode and was never explicitly requested. An explicit--backgroundcombined with--ignore-lockstill errors.Fixes TypeScript autocompletion for
getImage()to suggest all available predefined options.Fixes a type error in
getImage()options that allowed passing bothwidthsanddensitiesat the same time.Improves rendering performance
Fixes a WebAssembly error when importing
astro:actionsin tests that run under@cloudflare/vitest-pool-workersFixes trailing-slash redirect response body pointing to the incoming URL instead of the redirect target. The
locationheader was correct, but the HTML body (<meta http-equiv="refresh">,<title>, and<a>tag) contained the original request path without the trailing-slash correction or query string.Fixes custom dev toolbar apps losing their UI after client-side navigation with
<ClientRouter />.Fixes prerendered Cloudflare pages rendering as
[object Object]whennodejs_compatis enabled inwrangler.tomlFixes a regression in
astro devwhere writes outside the module graph (for example,@astrojs/cloudflare's.wrangler/statefiles) invalidated the middleware on every request, causing repeated SSR reloads. Such writes no longer invalidate the middleware.- security
Updates
svgoto4.0.2to resolve a security advisory Fixes a one-time page reload shortly after the first load on cold dev-server starts when a project has framework components imported from MDX content entries. MDX files are now included in the dev dependency pre-bundling scan, so their framework dependencies are bundled up front instead of being discovered (and reloaded for) at runtime.
Improves dev server startup time. The content config and dev server app module graphs now begin compiling during server creation without blocking the server from listening. Request handling waits for the shared setup result when needed, cutting
astro devready time by roughly a third on projects with a content config.Improves the diagnostics of some Astro errors.
Fixes SVG
<style>elements nested inside<defs>or other container elements not being hashed for CSPFixes
experimental.incrementalBuildrestoring pages with stale CSS after a preprocessor partial changes or missing original images referenced by restored pagesFixes a bug where the dev server stripped the configured
basefrom URLs that only share a prefix with it. Withbase: '/s', requests to/src/...were rewritten to/rc/...and failed, breaking those pages during development.cfccafaThanks @gameroman! - Improves JSDoc for fonts apiFixes CSS HMR for framework components rendered through content entries after
ClientRouternavigationImproves serialization of transition animation values in generated CSS
Fixes content collection HMR not updating prerendered pages when an adapter enables a separate prerender environment (e.g.
@astrojs/cloudflarewithprerenderEnvironment: 'node')Fixes redirect targets being corrupted when a dynamic route parameter value contains
$replacement patterns like$&Fixes a bug where the
glob()content loader kept stale entries in the data store after the last file in a collection was deleted. Empty collections are now pruned correctly, and the file watcher is registered in dev so the first file added to an empty collection is picked up without a restart.Pre-bundles renderer server entrypoints and the default console logger during dev so they are included in the initial optimization pass, preventing a mid-request re-optimization that could crash the dev server on Cloudflare (workerd).
7.3.2
8 September 2026Fixes / rendering in MDX so that only literal content (including content injected by remark/rehype plugins) is treated as trusted markup. A dynamic value passed as a / child (e.g. {value}) is now escaped like any other element's content instead of being rendered raw. Use set:html to explicitly opt a dynamic value back into raw rendering.
Patch Changes
Fixes
<script>/<style>rendering in MDX so that only literal content (including content injected by remark/rehype plugins) is treated as trusted markup. A dynamic value passed as a<script>/<style>child (e.g.<script>{value}</script>) is now escaped like any other element's content instead of being rendered raw. Useset:htmlto explicitly opt a dynamic value back into raw rendering.Fixes the dev toolbar returning a 504 "Outdated Optimize Dep" error when a workspace-linked package imports a dependency that Vite's initial scan did not discover
Fixes i18n fallback routing replacing the first substring match instead of the actual locale segment, which mangled paths like
/energy/en/aboutinto/esergy/en/aboutFixes sessions breaking in dev mode with the Cloudflare adapter when middleware is present
7.3.1
3 September 2026Fixes an error that prevented projects using astro:assets from starting or building
Patch Changes
Fixes an error that prevented projects using
astro:assetsfrom starting or building
Show 15 earlier releases
7.3.0
3 September 2026Adds --ignore-lock flag to astro preview, allowing multiple preview servers to run simultaneously on different ports. This is useful for E2E testing workflows (e.g., Playwright) that need to run several preview servers at once.
Minor Changes
Adds
--ignore-lockflag toastro preview, allowing multiple preview servers to run simultaneously on different ports. This is useful for E2E testing workflows (e.g., Playwright) that need to run several preview servers at once.Adds a
loggerparameter to image services hooksCustom image services now receive Astro's runtime logger as an extra argument. Messages logged with it are routed through the destination configured in
loggerand respect your log level, instead of being written straight to the console:import type { LocalImageService } from 'astro'; const service: LocalImageService = { // ... async transform(inputBuffer, transform, imageConfig, logger) { logger.warn(`Could not optimize "${transform.src}". Passing it through unchanged.`); return { data: inputBuffer, format: 'png' }; }, };Astro's built-in Sharp service now uses this logger for the warnings it emits when it encounters an unexpected or unsupported source format.
Adds
loggerto the context object passed to cache providersCustom cache providers now receive Astro's runtime logger on the context passed to
onRequest(). Messages logged with it are routed through the destination configured inloggerand respect your log level, instead of being written straight to the console:import type { CacheProvider } from 'astro'; const provider: CacheProvider = { name: 'my-cache', async onRequest({ request, url, logger }, next) { logger.warn(`Skipping cache for ${url.pathname} because the response sets a cookie.`); return next(); }, // ... };Astro's built-in
memoryCache()provider now uses this logger for the warnings it emits when it skips caching a response that sets cookies, and when a background revalidation fails.
Patch Changes
Updates Astro's remaining internal warnings and errors to be written through the configured logger instead of directly to the console, when possible
Fixes the memory cache provider to skip responses with
Vary: CookieorVary: *Improves build performance for sites with a large number of pages coming from a large amount of different modules.
Adds concurrent rendering support for
experimental.incrementalBuild, including when using@astrojs/cloudflareIncremental builds no longer disable caching when
build.concurrencyis greater than1. Projects that setbuild.concurrency: 1to keep the cache enabled can remove that workaround. Cloudflare builds also reduce serialization overhead for large prerendered pages.Fixes missing styles, links, and scripts from content collection entries rendered inside server islands
Fixes i18n fallback routes being generated with a corrupted path when the locale code also appears at the start of a later path segment. A page such as
src/pages/en/enterprise.astrowithfallback: { es: 'en' }produced the route/es/esterpriseinstead of/es/enterprise, so the fallback never matched the intended URL. Only the leading locale segment is rewritten now.
7.2.10
31 August 2026Fixes @astrojs/markdown-remark being pinned to an exact version.
Patch Changes
Fixes
@astrojs/markdown-remarkbeing pinned to an exact version.Fixes SSR manifest placeholder not being replaced when the server build is minified, which caused a runtime
Invalid URLcrash at server bootFixes a case where the logger was improperly initialized at runtime in dev.
Fixes browser heuristic caching for cached responses that include
Last-ModifiedorETagvalidatorsFixes prerender conflict warnings to correctly identify the route that first rendered a duplicate pathname, instead of misattributing the conflict to an unrelated route that merely matches the URL pattern
Fixes Markdown images in content collections rendering an empty
srcsetattribute when no responsive candidates are generated.Fixes a bug where editing a content collection entry during
astro devon Windows kept serving stale content until the dev server was restarted. The data store now notifies the dev server directly after each write instead of relying only on the file watcher, which can miss the atomic rename that commits the write on some platforms.
7.2.9
27 August 2026Fixes importing .html files not being typed outside of .astro files
Patch Changes
Fixes importing
.htmlfiles not being typed outside of.astrofilesFixes a crash when requesting
/index.htmlagainst a dynamic page route like[slug].astroFixes SSR manifest containing stale
entryModulesreferences to prerender-only chunks that no longer exist in the final build outputFixes
set:textescaping in MDX script and style elements
7.2.8
26 August 2026Updates the minimum supported version of Sharp to 0.35.4
Patch Changes
Updates the minimum supported version of Sharp to 0.35.4
Replaces the internal
find-processdependency with a smaller, lighter alternative
7.2.7
25 August 2026Deserializes each route once when loading the SSR manifest
Patch Changes
Deserializes each route once when loading the SSR manifest
Fixes route selection for normalized request paths in adapter and development request handling
Updates generated and default Cloudflare
compatibility_datevalues to match the installed runtime and requires Wrangler^4.125.0Fixes
rewrite()andnext(payload)for GET and HEAD requests with host-provided bodiesFixes the experimental
svgOptimizernot generating unique per-file ID prefixes when using SVGO'sprefixIdsplugin
7.2.6
24 August 2026Fixes a bug where new FetchState(request) could fail in development when server dependencies were optimized
Patch Changes
Fixes a bug where
new FetchState(request)could fail in development when server dependencies were optimized
7.2.5
24 August 2026Fixes a bug where experimental_getFontFileURL() rejected valid font URLs when using the Cloudflare adapter
Patch Changes
Fixes a bug where
experimental_getFontFileURL()rejected valid font URLs when using the Cloudflare adapterSkips no-op pathname writes when normalizing SSR request URLs
Updates deprecation messages target from Astro 7 to 8
Fixes session ID validation to reject non-UUID cookie values before using them as storage keys
Fixes
--mode,--site,--base,--out-dir,--verbose,--silent, and--openflags being silently dropped when usingastro dev --backgroundorastro preview --backgroundFixes
content-modules.mjsnot removing entries for deleted or renamed content files, which could cause Vite to attempt to resolve non-existent modulesAs part of this fix,
#moduleImportsis now fully rebuilt fromdeferredRenderentries before every write, so a module import added only through the publicaddModuleImport()API without a correspondingdeferredRenderentry in the store will no longer be preserved across writes.Fixes
Astro.preferredLocaleandAstro.preferredLocaleListignoringAccept-Languagequality values when they are absent or0. An entry without an explicitq=now correctly counts as quality1.0(per RFC 7231) and an entry withq=0is treated as not acceptable, so the highest-quality locale is selected regardless of header order.Fixes build errors showing wrong file location, missing line:col, and misleading hints when a plugin error (e.g. from MDX) is wrapped by Vite's build error
Fixes a type error when passing an image from a content collection
image()schema to a component or<Image />. The schema returned byimage()was missing theapngformat, so it no longer matched the type of an imported image.Fixes an issue where Astro CSP support didn't correctly handle cases
"unsafe-inline"resource. Now when"unsafe-inline", Astro won't emit hashes for the directive specified.Fixes a regression in the content collections that could cause images to not be resolved
Fixes
memoryCache()storing responses that set cookies throughAstro.cookiesorAstro.sessionFixes
server:defercrashing the dev server with "undefined is not a function" when a deferred component imports fromastro:i18nFixes a regression where
transition:persiststopped working for<audio>and<video>elements.Adds support for importing
.apngfiles as image metadata for use with standard<img>elements. Astro's image components reject APNG files to avoid removing their animationFixes i18n
fallbackType: "rewrite"returning 500 instead of 404 when the fallback locale also has no matching static path for a prerendered dynamic routeBumps the Astro compiler to the latest version. Changelog.
Improves the performance of the Astro CLI in local by enabling Node's module compilation cache.
Fixes incremental builds serving cached HTML that references stale CSS filenames after a stylesheet-only edit
Fixes the dev server refusing to start in Docker containers after a restart due to PID reuse in the lock file check
Fixes a build failure when defining
vite.environments.ssrin the Astro config. User-provided environment config forssr,prerender, orclientis now properly deep-merged with Astro's internal environment settings instead of silently breaking the server entry naming.Fixes the
glob()content loader failing to load files with colons in their names (e.g.,Guide: Architecture.md)
7.2.4
19 August 2026Fixes builds hanging when an image file is malformed
Patch Changes
Fixes builds hanging when an image file is malformed
Fixes base path stripping to respect path-segment boundaries. With a configured
basesuch as/docs, a request like/docs-archive/pageis no longer treated as being under the base, so routing andcontext.url.pathnamenow agree on the same pathname.Fixes
astro buildthrowingTypeError: Missing parameterfor dynamic routes whenbuild.format: 'preserve'andtrailingSlash: 'always'are used together. Stripping the framework-injected.htmlsuffix dropped the trailing slash that the compiled route pattern requires, so the route no longer matched itself and its params resolved as empty.Fixes
Astro.sitealways beingundefinedwhen rendering components via the Container API, even whensiteis set inastroConfig
7.2.3
18 August 2026Fixes an issue where Astro could run out of memory when experimental.collectionStorage is set to chunked and there are multiple concurrent updates to the same collection.
Patch Changes
Fixes an issue where Astro could run out of memory when
experimental.collectionStorageis set tochunkedand there are multiple concurrent updates to the same collection.Fixes the dev server sometimes matching against stale routes after pages were added, removed, or renamed, requiring a dev server restart to pick up the change
Fixes the composable request helpers (
astro/fetch) throwing an error when used on a request that had been rewritten withAstro.rewrite()ornext()Refactors Astro's internal server-side request handling. This is an internal change: all documented public APIs, including
AppandNodeApp, keep their existing signatures and behavior.The undocumented internal
app.pipelineproperty and theAppPipelineexport fromastro/apphave been removed. Adapters that usedapp.pipeline.getLogger()to wait for the configured log destination can call the newapp.getLogger()instead.As a result of this refactor,
new FetchState(request)fromastro/fetchnow works anywhere inside a built Astro server — including customsrc/fetch.tsentrypoints — without the request needing to first pass throughapp.render(). Previously this threw an error, breaking patterns like the Cloudflare adapter's advanced custom-worker setup.Fixes a link in font providers JSDoc annotations
Fixes several documentation issues related to the JSDoc for configuration options.
When hovering over the
serverandfontsoptions, the JSDoc for the nested options was displayed instead of the JSDoc for the top-level property.Two i18n configuration options were being used incorrectly in the examples.
The indentation of some code blocks was broken on hover.
Fixes a crash when a request arrives with a malformed port in the
Hostheader (for exampleexample.com:65536orexample.com:8080:8080). Such a host made the constructed request URL invalid, and the fallback that was meant to recover reused the same invalid host and threw again. The request URL now degrades to a host the server controls when the incoming host cannot be parsed, so the request is handled instead of erroring.Fixes a dev server error where an SSR full reload triggered by a third-party Vite plugin (such as
@tailwindcss/vite) could fail withFailed to load url astro:server-app.jsImproves error handling for custom log destinations. When the configured logger fails to load, Astro now reports the error and continues with the default console logger instead of failing the first request.
Fixes
getCollection()andgetEntry()throwingDataCloneErrorwhen a collection schema transform returns aTemporal.PlainDateor other class instance.
7.2.2
13 August 2026Fixes component styles rendered from content entries remaining stale until a second save when an adapter uses Astro's fallback development environment
Patch Changes
Fixes component styles rendered from content entries remaining stale until a second save when an adapter uses Astro's fallback development environment
Fixes incremental builds dropping optimized images for cached pages when using a
collectStaticImagesprerenderer (e.g.@astrojs/cloudflarewith compile-time image optimization)Fixes intermittent
ImageNotFounderrors during build on projects with many images. The build now limits concurrent image file reads to avoid exhausting OS file descriptors (EMFILE) and retries transient I/O errors with backoff. Non-transient errors are no longer silently swallowed.Fixes
prerenderConflictBehaviornot applying to content collection duplicate ID warnings in theglob()andfile()loaders. Setting it to'error'now throws during content sync, and'ignore'suppresses the warning.Fixes the Fonts API breaking
experimental.incrementalBuildcaching by embedding a build-local, randomly-assigned server port in generated code used for the dependency hashFixes incremental builds becoming prohibitively slow for sites with many pages or content entries that share a large dependency graph.
Prevents files in directories whose names start with
pagesfrom being treated as page routesFixes
astro devrefusing to start after a Docker container restart when an unrelated process reuses the PID from a persisted lock file. Astro now checks the process command across platforms, so stale lock files are cleaned up and--forcedoes not signal the unrelated process.
7.2.1
11 August 2026Fixes CSS hot module replacement after navigating between pages with ClientRouter
Patch Changes
Fixes CSS hot module replacement after navigating between pages with
ClientRouterFixes a CSP violation when using both
security.cspandexperimental.clientPrerenderwithdata-astro-prefetchlinks. The dynamically injected<script type="speculationrules">now uses a static"source": "document"approach with a CSS selector, producing a deterministic payload that is hashed and included in the CSPscript-srcdirective at build time.Fixes middleware HMR not responding to changes in imported modules. Previously, only direct edits to the middleware file would trigger a reload.
Fixes a regression where content collection
reference()fields silently accepted entry IDs that don't exist, such as an ID that doesn't match a loader's slugified version of it. Astro now logs an error for references that point to a missing entry after all loaders finish syncing.Improves Markdown options documentation with links to the Markdown guide and official processors.
Fixes an issue where requests handled by the dev prerender environment (e.g.
/_imagewith@astrojs/cloudflare'sprerenderEnvironment: 'node') returned a 500 when a prerendered catch-all route existed, because non-prerendered route modules were imported in an environment where their runtime-specific APIs are unavailableFixes
<video>and<audio>elements being non-functional after navigating via view transitions (<ClientRouter />)Fixes
experimental.incrementalBuildre-rendering unchanged routes that import more than one asset. The route's dependency hash depended on the order the assets finished building, so two builds of identical sources could produce different hashes. The hash is now based on the file name each asset resolves to.Improves
getCollection()andgetEntry()performance for entries without local image referencesFixes a build error caused by hash collisions in generated content collection image import identifiers
7.2.0
6 August 2026Adds the astro preview --background flag to start preview servers as background processes.This makes preview servers easier to manage from scripts and AI coding agents because the command returns after the server is ready instead of keeping the terminal attached to the long-running process.astro preview --backgroundWhen a preview server is running in the background, you can inspect or stop it with new astro preview subcommands:astro preview status
Minor Changes
Adds the
astro preview --backgroundflag to start preview servers as background processes.This makes preview servers easier to manage from scripts and AI coding agents because the command returns after the server is ready instead of keeping the terminal attached to the long-running process.
astro preview --background
When a preview server is running in the background, you can inspect or stop it with new
astro previewsubcommands:astro preview status astro preview logs astro preview logs --follow astro preview stop
If Astro detects that
astro previewis being run by an AI coding agent, background mode is enabled automatically. This matches the existing behavior forastro dev, allowing agents to continue working after the preview server starts while still receiving the server URL and process ID.To opt out of automatic background mode for preview servers, set
ASTRO_PREVIEW_BACKGROUND=0before runningastro preview.Adds support for paths relative to your project root in
logger.entrypointPreviously, pointing
logger.entrypointat a custom log handler living in your own project required building an absoluteURL. You can now write the path directly:// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ logger: { - entrypoint: new URL('./src/logger.js', import.meta.url), + entrypoint: './src/logger.js', }, });Paths starting with
./or../are resolved against your project root. Package specifiers such as@org/astro-logger, absolute paths, andURLentrypoints keep working as before.Widens the
AstroPrerendererrender()return type so prerenderers can report incremental-build metadataA prerenderer's
render()may now resolve to either aResponse(as before) or aPrerenderResultobject that pairs the response with the content entries and optimized-image transforms the page resolved. This lets prerenderers that render out of process (for example, in an adapter's runtime like workerd) report those dependencies back to the build, so incremental static builds can track and replay them for skipped pages.import type { AstroPrerenderer, PrerenderResult } from 'astro'; const prerenderer: AstroPrerenderer = { name: 'my-adapter:prerenderer', getStaticPaths, async render(request, { routeData }): Promise<PrerenderResult> { const { response, metadata } = await renderInRuntime(request, routeData); return { response, metadata }; }, };This is a non-breaking widening: prerenderers that return a bare
Responsecontinue to work unchanged, and in-process prerenderers can keep returning aResponsesince the build collects their metadata directly.Adds
session: falseinastro.configto opt out of session support. Projects that do not setsession: falsesee no behavior change.import { defineConfig } from 'astro/config'; export default defineConfig({ session: false, });The session runtime and dependencies (
unstorage) are now tree-shaken out of the SSR bundle for any project where no session driver is wired via:session: falseno
sessionconfig at alla
sessionconfig without a driver
Useful for serverless/edge runtimes where cold-start parse time is sensitive.
Adds experimental support for incremental static builds with
experimental.incrementalBuild.When enabled, Astro can skip regenerating static pages from dynamic routes when both the page's module dependencies and its data cache key are unchanged from the previous build. This currently applies to pages returned from
getStaticPaths()that include acacheKey.// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ experimental: { incrementalBuild: true, }, });Return a
cacheKeyfor each generated page fromgetStaticPaths():--- export async function getStaticPaths() { const posts = await fetchPosts(); return posts.map((post) => ({ params: { slug: post.slug }, props: { post }, cacheKey: post.digest, })); } ---For incremental builds to skip rendering in CI, Astro's cache directory must be preserved between builds. Astro empties the output directory on each build and restores skipped pages from the cache directory, so only that directory needs to persist. For the default config, cache and restore
node_modules/.astro/before runningastro build.See the experimental incremental static builds documentation for more information.
Adds the optional
digestproperty to content collection entries.Loaders can provide an opaque digest value that changes when an entry changes. This is now reflected in the
CollectionEntrytype returned bygetCollection()andgetEntry(), making it easier to detect content changes without re-hashing large entry bodies.--- import { getCollection } from 'astro:content'; const posts = await getCollection('blog'); for (const post of posts) { console.log(post.digest); } ---The property is optional because not every loader provides a digest. See incremental static builds for how
digestcan be used as acacheKey.
Patch Changes
Improves
logger.entrypointreference docsFixes
astro devcrashing withInvalid URLwhen--hostis set to a specific non-loopback addressVite only reports a
localURL for loopback hosts. When the dev server was started with--host <custom-address>bound to a specific non-loopback address (a LAN or Tailscale IP, for example), the URL was reported undernetworkandlocalwas empty, so writing the dev lock file threwInvalid URLand killed a server that had already started successfully.The lock file URL now falls back to the network URL, and a server that exposes no URL at all is left untracked rather than being taken down by lock file bookkeeping.
Fixes
fontProviders.googleicons()returning the full icon font (~3.9MB) instead of only the requested glyphs when multipleexperimental.glyphsare specifiedFixes
Astro.url.pathnamefor non-index pages when usingbuild.format: 'preserve'. Previously, a page likesrc/pages/about-me.astrowould output todist/about-me.htmlbutAstro.url.pathnamewould incorrectly return/about-me/instead of/about-me.html.Fixes a Content Layer build crash that could occur when another dependency causes an older version of
neotraverseto be hoisted to the project rootFixes cookies set via
Astro.cookies.set()inside a custom404.astroor500.astroerror page being silently dropped from the final responseSupports the
devEnginesfield in package.json when detecting the package manager for install commandsFixes
popoverbeing rendered aspopover="true"/popover="false"on custom elements (tag names containing a hyphen). Per the Popover API, the attribute only accepts"auto","manual", or being absent, so boolean values are now always rendered as a barepopoverattribute (or omitted), regardless of the tag name.
7.1.6
29 July 2026Fixes concurrent static builds failing to generate i18n rewrite fallbacks for dynamic routes
Patch Changes
Fixes concurrent static builds failing to generate i18n rewrite fallbacks for dynamic routes
Fixes stale dev CSS after editing component style blocks and CSS files in dev
Adds a feature to
experimental.collectionStoragethat allows to change the size of chunks.For example, you can reduce the size of chunks to 1MB:
// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ experimental: { collectionStorage: { type: 'chunked', chunkSize: 1024 * 1024, }, }, });Bumps the Astro compiler to the latest version. Changelog.
7.1.5
28 July 2026Fixes a bug where an error while finalizing a request could prevent a response from being sent
Patch Changes
Fixes a bug where an error while finalizing a request could prevent a response from being sent
Fixes a case where a custom
logger.entrypointfailed to load at runtime in a built server bundle.Fixes action path resolution so that properties of a resolved action function are not treated as routable path segments
Fixes a bug where the custom 404 (or 500) page was not rendered when a middleware rewrite targeted a route that returned an empty 404/500 response, and a blank page was returned instead
Updates dependency
js-yamlto v4.3.0
7.1.4
27 July 2026Fixes duplicate CSS files being emitted in server output when a prerendered page and a server-rendered page share the same styles (e.g. a shared layout importing Tailwind). The prerender and SSR environments each emitted their own copy of the same stylesheet (index.X.css and _..Y.css); the SSR build now reuses the CSS asset filename from the prerender build when the stylesheet is backed by the same CSS source modules, so only a single file is emitted.
Patch Changes
Fixes duplicate CSS files being emitted in server output when a prerendered page and a server-rendered page share the same styles (e.g. a shared layout importing Tailwind). The prerender and SSR environments each emitted their own copy of the same stylesheet (
index.X.cssand_..Y.css); the SSR build now reuses the CSS asset filename from the prerender build when the stylesheet is backed by the same CSS source modules, so only a single file is emitted.Adds the missing
backgroundprop to the<Image />and<Picture />component types. The prop already worked at runtime, but was absent from the types, causingastro checkto report thatbackgrounddoes not exist on the component propsFixes missing scoped styles for child components inside
client:onlyislands in production buildsFixes session runtime errors being silently swallowed by
console.errorinstead of routing through Astro's loggerFixes a session being left in a partial state after a storage failure during
session.regenerate(), preventing unnecessary storage reads on subsequent operationsPrevents a visible terminal window from popping up on Windows when the dev server runs in background mode. The detached child process is now spawned with
windowsHide: true, so console-subsystem grandchildren (such asworkerd.exe) no longer get a new focus-stealing window allocated by Windows Terminal.Fixes the
glob()loader watcher so negation patterns like!docs/drafts/**correctly exclude files during development, matching the behavior of the initial scan. Previously, negations were treated as independent matchers, causing unrelated files (including.astro/data-store.json) to be ingested as collection entriesFixes TypeScript path aliases from
tsconfig.jsonnot resolving inastro.config.ts
Major versions
- 7.xsince 22 June 2026 · latest 7.4.1 · 39 releases
- 6.xsince 10 March 2026 · latest 6.4.8 · 41 releases
- 5.xsince 3 December 2024 · latest 5.18.2 · 137 releases
- 4.xsince 5 December 2023 · latest 4.16.19 · 145 releases
- 3.xsince 30 August 2023 · latest 3.6.5 · 48 releases
- 2.xsince 24 January 2023 · latest 2.10.15 · 93 releases
- 1.xsince 9 August 2022 · latest 1.9.2 · 65 releases
- 0.xsince 12 March 2021 · latest 0.26.1 · 162 releases
Quality and security signals
What npm and deps.dev say about the latest release. Signals, not a verdict.
Reading npm and deps.dev…
Registry facts last checked 20 October 2026. Releases and advisories last read 20 October 2026.
Know when your own dependencies move
Inlinr tracks your coding time automatically. Switch dependency tracking on for a project and it reads that repository's manifest to show what is behind and what has been deprecated — off by default, one project at a time.