Junglewise Threat Intelligence

CVE-2026-33769: Astro remotePatterns allowlist bypass via unanchored wildcard

CVE-2026-33769 · Severity: low · CVSS 3.1 · Published 2026-03-26

Technologies: astro (npm). Vendors: Astro, npm.

Executive brief

Astro is a web framework that enforces path allowlists on remote image resources through the image optimization endpoint. A flaw in the path matching logic allows attackers to bypass these restrictions and fetch unintended resources from allowlisted hosts, potentially exposing sensitive data or enabling server-side request forgery (SSRF) attacks beyond the configured path restrictions.

Technical details

The vulnerability exists in Astro's matchPathname() function within the remote pattern validation logic. When handling wildcard patterns ending in "/*", the code uses String.replace() without anchoring the pattern, allowing any pathname containing the allowed prefix anywhere in the path (not just at the start) to match. For example, a pattern configured to allow "/img/*" incorrectly matches requests to "/evil/img/secret" because the replace() call removes the "/img/" substring regardless of position. This unanchored matching affects the image optimization endpoint's server-side URL validation. The vulnerable code was introduced in versions after 2.10.10 through 5.18.0 and has been patched in version 5.18.1.

Affected products

  • Astro Astro >2.10.10, <=5.18.0

Timeline

  • 2026-03-26: disclosed
  • 2026-03-26: patched: Patch released as version 5.18.1

References

Related threats