astro
7.4.13 · 18 Nov 2026MIT12.5M / weekRepositoryHomepagenpmAtom feed
7.4.13 is the newest release of 7.x.
In short
1 security25 fixed
Security
Fixes 1 advisory that affected 7.3.2
- LowAstro: Arbitrary CSS injection in Astro View TransitionsGHSA-mpr7-6m5w-76rw · 22 Oct 2026Fixed in 7.3.3
2 advisories affect 7.3.3; 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
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).
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.