astro
7.4.13 · 18 Nov 2026MIT12.5M / weekRepositoryHomepagenpmAtom feed
6.4.8 is the newest release of 6.x.
In short
16 fixed
Security
11 advisories affect 6.2.2; 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
6 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
- 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
Release note
Patch Changes
Fixes head metadata propagation in dev for adapters that load modules in the
prerenderVite environment, such as@astrojs/cloudflare. Theastro:head-metadataplugin previously only tracked thessrenvironment, somaybeRenderHead()could fire inside an unrelated component's<template>element, trapping subsequent hoisted<style>blocks.Fixes build crash when processing animated AVIF images. Sharp now gracefully passes through unsupported image formats instead of crashing during the build.
Fixes scoped styles applying to the wrong element when
vite.css.transformeris set to'lightningcss'and a selector uses a nested&inside:where(...), such as Tailwind v4'sspace-x-*,space-y-*, anddivide-*utilities.Fixes
data-astro-prefetch="tap"not triggering when clicking nested elements (e.g.<span>,<img>,<svg>) inside an anchor tag.Fix
<style>compilation failure when importing Astro components via tsconfig path aliasesFixed a regression where
.htmlwas unexpectedly stripped from dynamic route parameters on non-page routes (.tsendpoints and redirects). This caused endpoints like/some/[...id].tsreturningid: 'file.html'ongetStaticPathsto not serve that file because the generated route (/some/file.html) would get matched asid: filethat is not part of the list returned bygetStaticPaths.Fix CSS traversal boundaries so pages with
export const partial = truestill contribute styles when imported as components by other pages.Fixes an issue where the index route would return a 404 error when using a custom
basepath combined withtrailingSlash: 'never'. This ensures that the home page and internal rewrites are correctly matched under these configurations.Fixes an issue where
i18n.fallbackpages withfallbackType: 'rewrite'were emitted with empty bodies duringastro build.Fixes session persistence when
session.delete()is the first mutation in a request (no priorget,set,has, orkeys). The session was marked dirty in memory, but persistence skipped the save because#datastayedundefined, so the backing store could still return the deleted key on the next request.Prevents script deduplication state from being consumed while rendering inert
<template>contexts.Skips session storage reads when no session cookie is present. Previously, calling
session.get()on a request without a session cookie would initialize the storage driver and make a read that was guaranteed to miss. On network-backed drivers this added latency and resource usage to every anonymous request.Removes inline CSS for prerendered routes from the SSR manifest. The static HTML on disk already inlines those styles, and the SSR worker never renders prerendered routes, so the data was dead weight. Builds with many prerendered routes and
build.inlineStylesheets: "always"(or"auto"with small stylesheets) will see a smaller SSR entry chunk, which reduces cold-start parse time on platforms like Cloudflare Workers.Fix conditional named slot callbacks receiving arguments from
Astro.slots.render().Fixes the
positionprop on<Image />and<Picture />components to correctly applyobject-positionstylesFix
defineLiveCollection()soLiveLoaderdata types declared as interfaces are accepted.
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.