Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-54300

CVE-2026-54300: Astro Netlify Adapter Pattern Vulnerability

CVE-2026-54300 is a pattern matching flaw in @astrojs/netlify adapter where image.remotePatterns are converted to overly permissive regular expressions. This post explains its impact, affected versions, and mitigation steps.

Published:

CVE-2026-54300 Overview

CVE-2026-54300 affects @astrojs/netlify, the adapter that deploys Astro hybrid or server-rendered sites to Netlify. Versions prior to 7.0.13 convert Astro image.remotePatterns into Netlify Image CDN images.remote_images regular expressions with broader matching semantics than Astro's canonical matcher. The conversion expands wildcard hostnames and pathnames beyond their intended scope, allowing the Netlify Image CDN to fetch remote images from hosts and paths the application developer did not authorize. The flaw is categorized as Server-Side Request Forgery [CWE-918] and is fixed in version 7.0.13.

Critical Impact

Attackers can submit image transformation requests that proxy through the Netlify Image CDN to unintended hosts or path prefixes, enabling limited SSRF and confidentiality impact against resources reachable by the CDN.

Affected Products

  • @astrojs/netlify adapter versions prior to 7.0.13
  • Astro sites deployed to Netlify using image.remotePatterns configuration
  • Netlify Image CDN images.remote_images allowlists generated by the adapter

Discovery Timeline

  • 2026-06-22 - CVE-2026-54300 published to NVD
  • 2026-06-23 - Last updated in NVD database

Technical Details for CVE-2026-54300

Vulnerability Analysis

The @astrojs/netlify adapter translates the Astro image.remotePatterns allowlist into regular expressions consumed by the Netlify Image CDN. The translation logic produces patterns that match a superset of what Astro's own matcher would permit at runtime. This mismatch breaks the trust boundary developers expect when configuring image sources. The Netlify Image CDN then accepts and proxies image requests from origins the developer believed were excluded.

This maps to Server-Side Request Forgery [CWE-918] because the adapter induces a server-side component to issue requests to attacker-influenced destinations. The impact is limited to confidentiality of resources the CDN can reach, with no integrity or availability impact reflected in the scoring.

Root Cause

Two conversion errors drive the issue. First, a wildcard hostname such as *.example.com is converted into a regex where the subdomain segment is optional, so the apex host example.com also matches. Second, a wildcard pathname such as /ok/* is converted without an end anchor, so deeper paths like /ok/anything/else match by prefix. Either deviation widens the allowlist beyond the developer's intent.

Attack Vector

An attacker constructs an image transformation URL targeting the Netlify Image CDN endpoint of a vulnerable site. The crafted URL references a hostname or path that should fall outside the configured remotePatterns allowlist but matches the over-broad regex produced by the adapter. The CDN fetches the remote resource and returns it through the site's domain. No authentication or user interaction is required. See the GitHub Security Advisory GHSA-529g-xq4f-cw38 for technical details of the affected conversion routine.

Detection Methods for CVE-2026-54300

Indicators of Compromise

  • Netlify Image CDN access logs showing image proxy requests to hostnames not present in the application's image.remotePatterns configuration.
  • Outbound image fetches from the Netlify edge to apex domains where only subdomain wildcards were intended.
  • Image transformation requests whose decoded source URL contains path segments beyond the configured wildcard prefix.

Detection Strategies

  • Compare the generated images.remote_images regex set against the source image.remotePatterns and flag entries that lack end anchors or treat subdomain segments as optional.
  • Review the deployed @astrojs/netlify version across build artifacts and CI pipelines and alert on versions below 7.0.13.
  • Inspect Netlify function and edge logs for repeated image transformation requests sourcing diverse external hosts.

Monitoring Recommendations

  • Forward Netlify build and request logs to a centralized analytics platform and alert on image CDN fetches to unexpected origins.
  • Track dependency manifests (package.json, package-lock.json) for pinned vulnerable versions of @astrojs/netlify.
  • Monitor for anomalous spikes in image transformation traffic that correlate with external hostnames not owned by the site operator.

How to Mitigate CVE-2026-54300

Immediate Actions Required

  • Upgrade @astrojs/netlify to version 7.0.13 or later and redeploy the affected Astro site.
  • Audit the deployed netlify.toml or generated configuration to confirm the resulting images.remote_images patterns match developer intent.
  • Tighten image.remotePatterns entries to use explicit hostnames and fully specified pathnames where possible.

Patch Information

The fix is delivered in @astrojs/netlify version 7.0.13. The patch corrects the wildcard hostname conversion so that the subdomain segment is required and corrects the pathname conversion so that wildcard paths are anchored at the end. Refer to the GitHub Security Advisory GHSA-529g-xq4f-cw38 for the upstream commit and release notes.

Workarounds

  • Replace wildcard subdomain patterns such as *.example.com with an explicit list of permitted subdomains until the upgrade is applied.
  • Replace wildcard path patterns such as /ok/* with concrete pathnames or pathnames followed by stricter custom patterns.
  • Manually override the generated images.remote_images regular expressions in the Netlify configuration to add end anchors and require subdomain segments.
bash
# Configuration example
npm install @astrojs/netlify@^7.0.13

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.