Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. astro
  4. ›
  5. CVE-2026-59731

CVE-2026-59731: Astro: Authorization Bypass via Decode Iteration Limit and Rewrite Path Canonicalization Mismatch

July 20, 2026

Astro 6.4.7 appears to reintroduce a middleware authorization bypass pattern when a request path is encoded more deeply than the newly introduced iterative URL decoder’s maximum decoding depth.

The issue occurs because Astro performs authorization decisions on a partially decoded pathname after reaching a decoding iteration cap, while later route matching logic performs an additional decodeURI() operation and resolves the request to a protected route.

As a result, middleware and route matching may operate on different pathname representations, enabling authorization bypasses under specific application patterns.

Potential CWE: CWE-647 – Use of Non-Canonical URL Paths for Authorization Decisions


References

  • github.com/advisories/GHSA-vj59-8hwv-xxmv
  • github.com/withastro/astro/commit/27c80ea92248993e5fce94b2c26d87d611ab6785
  • github.com/withastro/astro/pull/17109
  • github.com/withastro/astro/releases/tag/astro@6.4.8
  • github.com/withastro/astro/security/advisories/GHSA-vj59-8hwv-xxmv
  • nvd.nist.gov/vuln/detail/CVE-2026-59731

Code Behaviors & Features

Detect and mitigate CVE-2026-59731 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 6.4.7 before 6.4.8

Fixed versions

  • 6.4.8

Solution

Upgrade to version 6.4.8 or above.

Impact 8.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-647: Use of Non-Canonical URL Paths for Authorization Decisions

Source file

npm/astro/CVE-2026-59731.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:17:33 +0000.