Packages

astro

7.4.13 · 18 Nov 2026MIT12.5M / weekRepositoryHomepagenpmAtom feed

Upgrading astro From 5.0.6 to 5.18.2

130 releases in betweenevery note read

Other targets from 5.0.6Clears its 22 advisories7.4.5Latest7.4.13
  1. 5.0.6yours
  2. 23 releases
  3. 5.4.0security
  4. 3 releases
  5. 5.5.0security
  6. 27 releases
  7. 5.9.0security
  8. 45 releases
  9. 5.15.5security
  10. 2 releases
  11. 5.15.8security
  12. 24 releases
  13. 5.18.2target

Start here

Before you upgrade

Tick each one off as you go
  • Breaking5.17.1
  • Breaking5.14.6
  • Breaking5.14.6
  • Breaking5.13.5
  • Breaking5.9.3
  • Breaking5.9.2
  • Breaking5.8.0
  • Breaking5.6.0
  • Breaking5.5.0
  • Breaking5.4.1

Security

  • This prevents potential security issues where middleware checks might be bypassed through URL encoding.

    5.15.8
  • Improves X-Forwarded header validation to prevent cache poisoning and header injection attacks. Now properly validates X-Forwarded-Proto, X-Forwarded-Host, and X-Forwarded-Port headers against configured allowedDomains patterns, rejecting malformed or suspicious values. This is especially important when running behind a reverse proxy or load balancer.

    5.15.5
  • In particular, it can help protect against cross-site scripting (XSS) attacks.

    5.9.0
  • Updates primsjs to version 1.30.0, which adds support for more languages and fixes a security advisory which does not affect Astro.

    5.5.0
  • allowedHosts checks the Host header on HTTP requests from browsers and if it doesn't match, it will reject the request to prevent CSRF and XSS attacks.

    5.4.0

Release by release

  1. 5.18.2

    26 May 20261 fix
    • Fixed

      Populates styles in the SSR manifest for prerendered routes. Previously, prerendered routes had styles: in the manifest, making it impossible for workers or middleware to discover which CSS files a prerendered page uses.

  2. 5.18.1nothing new or fixed in the note

  3. 5.18.0

    25 Feb 20261 new · 1 fix
    • New

      Adds a new security.actionBodySizeLimit option to configure the maximum size of Astro Actions request bodies.

    • Fixed

      Fix X-Forwarded-Proto validation when allowedDomains includes both protocol and hostname fields. The protocol check no longer fails due to hostname mismatch against the hardcoded test URL.

  4. 5.17.3

    18 Feb 20261 new · 1 fix
    • New

      Add a default body size limit for server actions to prevent oversized requests from exhausting memory.

    • Fixed

      Respect image allowlists when inferring remote image sizes and reject remote redirects.

  5. 5.17.2

    11 Feb 20261 fix
    • Fixed

      Improves Host header handling for SSR deployments behind proxies

  6. 5.17.1

    Migration needed29 Jan 2026
    • Breaking

      BREAKING CHANGE to the experimental Fonts API only

  7. 5.17.0

    29 Jan 20266 new
    • New

      Adds support for returning a Promise from the parser() option of the file() loader

    • New

      Adds a new, optional kernel configuration option to select a resize algorithm in the Sharp image service

    • New

      Adds a new partitioned option when setting a cookie to allow creating partitioned cookies.

    • New

      Adds a new retainBody option to the glob() loader to allow reducing the size of the data store.

    • New

      Adds a new background property to the <Image /> component.

    • New

      Adds optional placement config option for the dev toolbar.

  8. 5.16.16

    28 Jan 20263 fixes
    • Fixed

      Ensures server island requests carry an encrypted component export identifier so they do not accidentally resolve to the wrong component.

    • Fixed

      Remove await from getActionResult example

    • Fixed

      Fixes an issue where certain unauthorized links could be rendered as clickable in the error overlay

1 other line we could not sort, mostly version bumps
  • The responsive images feature introduced behind a flag in v5.0.0 is no longer experimental and is available for general use.

    5.10.0

27 internal lines (docs, tests, tooling) left out.

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.