astro
7.4.13 · 18 Nov 2026MIT12.5M / weekRepositoryHomepagenpmAtom feed
7.4.13 is the newest release of 7.x.
In short
1 security2 new32 fixed2 internal
- Security
Improves CSRF protection by taking modern browsers headers into account
Security
2 advisories affect 7.3.6; 7.4.7 fixes them
- ModerateAstro: Image endpoint in @astrojs/node can read files from a case-variant sibling of the output directory on case-sensitive filesystemsGHSA-r3h5-4585-7x3w · 13 Nov 2026Fixed in 7.4.7
- LowAstro: XSS via attribute injection in dynamic tag namesGHSA-mh32-jxcr-mh9f · 13 Nov 2026Fixed in 7.4.5
Release note
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.
- Security
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 modulesFixes actions returning 500 for malformed JSON request bodies and undecodable action names. A
SyntaxErrorfrom invalid JSON now returns 400 (BAD_REQUEST), and aURIErrorfrom a malformed percent-encoded action name now returns 404 (NOT_FOUND).Validates the
Hostheader againstsecurity.allowedDomainswhen using the Node adapterFixes the
fontsourcefont provider to resolve variable fonts when using the "Variable" suffix in the font name (e.g."Inter Variable")Fixes
<video muted>losing its muted state after a ClientRouter navigation in ChromeFixes localized error pages such as
src/pages/pt/404.astroreturning a200status when rendered through thepages()handler fromastro/fetchorastro/honoFixes
experimental_AstroContaineroutput including dev toolbardata-astro-source-fileanddata-astro-source-locattributes when rendering components under Vitest
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.