astro
7.4.13 · 18 Nov 2026MIT12.5M / weekRepositoryHomepagenpmAtom feed
6.4.8 is the newest release of 6.x.
In short
2 security3 new15 fixed1 internal
- Security
Fixes
checkOriginCSRF protection inastro devbehind a TLS-terminating reverse proxy. The dev server now readsX-Forwarded-Proto(gated onsecurity.allowedDomains, matching production behaviour) so the constructed request origin matches thehttps://origin the browser sends. Also ensuressecurity.allowedDomainsandsecurity.checkOriginare respected in dev. - Security
Updates the dependency
svgoto the latest, to fix a security issue.
Security
13 advisories affect 6.1.0; 7.4.7 fixes them
- CriticalAstro: Remote code execution through AVIF image optimizationGHSA-26w7-cxv4-gfx2 · 8 Sep 2026Fixed in 7.2.8
- HighAstro: Host header SSRF in prerendered error page fetchGHSA-2pvr-wf23-7pc7 · 16 Jun 2026Fixed in 6.4.6
- HighAstro: Reflected XSS via unescaped slot nameGHSA-8hv8-536x-4wqp · 16 Jun 2026Fixed in 6.3.3
- 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
- ModerateAstro: Reflected/Stored XSS via unescaped <script>/<style> tag content in JSX/MDX renderingGHSA-98hj-9722-w3j8 · 22 Oct 2026Fixed in 7.3.2
8 more
- ModerateAstro: Authorization bypass from missing path-segment boundary check when stripping the configured baseGHSA-376h-93r7-7g6f · 8 Sep 2026Fixed in 7.2.4
- ModerateAstro: XSS via unescaped spread attribute names in renderHTMLElement (incomplete fix for CVE-2026-54298)GHSA-f48w-9m4c-m7f5 · 20 Jul 2026Fixed in 7.0.6
- ModerateAstro: Reflected XSS via unescaped View Transition animation propertiesGHSA-4g3v-8h47-v7g6 · 20 Jul 2026Fixed in 7.1.0
- ModerateAstro: XSS via Unescaped Attribute Names in Spread PropsGHSA-jrpj-wcv7-9fh9 · 16 Jun 2026Fixed in 6.4.6
- ModerateAstro: XSS in define:vars via incomplete </script> tag sanitizationGHSA-j687-52p2-xcff · 21 Apr 2026Fixed in 6.1.6
- LowAstro: XSS via attribute injection in dynamic tag namesGHSA-mh32-jxcr-mh9f · 13 Nov 2026Fixed in 7.4.5
- LowAstro: Cross-site scripting via unescaped transition:* directive values on hydrated islandsGHSA-7pw4-f3q4-r2p2 · 20 Jul 2026Fixed in 7.0.4
- LowAstro: Server island encrypted parameters vulnerable to cross-component replayGHSA-xr5h-phrj-8vxv · 13 May 2026Fixed in 6.1.10
Release note
Minor Changes
Allows setting codec-specific defaults for Astro's built-in Sharp image service via
image.service.config.You can now configure encoder-level options such as
jpeg.mozjpeg,webp.effort,webp.alphaQuality,avif.effort,avif.chromaSubsampling, andpng.compressionLevelwhen usingastro/assets/services/sharpfor compile-time image generation.These settings apply as defaults for the built-in Sharp pipeline, while per-image
qualitystill takes precedence when set on<Image />,<Picture />, orgetImage().Adds
fallbackRoutesto theIntegrationResolvedRoutetype, exposing i18n fallback routes to integrations via theastro:routes:resolvedhook for projects usingfallbackType: 'rewrite'.This allows integrations such as the sitemap integration to properly include generated fallback routes in their output.
{ 'astro:routes:resolved': ({ routes }) => { for (const route of routes) { for (const fallback of route.fallbackRoutes) { console.log(fallback.pathname) // e.g. /fr/about/ } } } }Adds support for advanced configuration of SmartyPants in Markdown.
You can now pass an options object to
markdown.smartypantsin your Astro configuration to fine-tune how punctuation, dashes, and quotes are transformed.This is helpful for projects that require specific typographic standards, such as "oldschool" dash handling or localized quotation marks.
// astro.config.mjs export default defineConfig({ markdown: { smartypants: { backticks: 'all', dashes: 'oldschool', ellipses: 'unspaced', openingQuotes: { double: '«', single: '‹' }, closingQuotes: { double: '»', single: '›' }, quotes: false, }, }, });See the
retext-smartypantsoptions for more information.
Patch Changes
Instructs the client router to skip view transition animations when the browser is already providing its own visual transition, such as a swipe gesture.
Fixes an issue where
client:onlycomponents could have duplicateclient:component-pathattributes added in MDX in rare casesFixes the
emitFile() is not supported in serve modewarning that appears duringastro devwhen using integrations that inject before-hydration scripts (e.g.@astrojs/react)Fixes the dev toolbar a11y audit incorrectly classifying
menuitemradioas a non-interactive ARIA role.Fixes
experimental.queuedRenderingincorrectly escaping the HTML output of.htmlpage files, causing the page content to render as plain text instead of HTML in the browser.Fixes a dev server crash (
serverIslandNameMap.get is not a function) that occurred when navigating to a page withserver:deferafter first visiting a page without one, when using@astrojs/cloudflareFixes Zod meta not correctly being rendered on top-level schema when converted into JSON Schema
- Security
Fixes
checkOriginCSRF protection inastro devbehind a TLS-terminating reverse proxy. The dev server now readsX-Forwarded-Proto(gated onsecurity.allowedDomains, matching production behaviour) so the constructed request origin matches thehttps://origin the browser sends. Also ensuressecurity.allowedDomainsandsecurity.checkOriginare respected in dev. - Security
Updates the dependency
svgoto the latest, to fix a security issue. Fixes a case where fonts files would unecessarily be copied several times during the build
Fix the
astro syncerror message whengetImage()is called while loading content collections.Fixes a build error where using
astro:config/clientinside a<script>tag would cause Rollup to fail with "failed to resolve importvirtual:astro:routesfromvirtual:astro:manifest"Fixes an issue with the development server, where changes to the middleware weren't picked, and it required a full restart of the server.
Fixes a bug where the the role
imagewas incorrectly reported by audit tool bar.Fixes cached assets failing to revalidate due to redirect check mishandling Not Modified responses.
Fixes a case where invalid URLs would be generated in development when using font families with an oblique
styleand anglesWarns on dev server startup when Vite 8 is detected at the top level of the user's project, and automatically adds a
"overrides": { "vite": "^7" }entry topackage.jsonwhen runningastro add cloudflare. This prevents arequire_dist is not a functioncrash caused by a Vite version split between Astro (requires Vite 7) and packages like@tailwindcss/vitethat hoist Vite 8.
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.