Impact
Astro versions before 8.1.2 generate regular expressions for Netlify image allowlisting from image.metadata.remotePatterns. While dots in hostnames are escaped, pathname literals are inserted into the regex without escaping metacharacters such as ., +, ?, (, and [. This permits a restricted pathname such as /img/v1.0/file to match URLs with adjacent characters, inadvertently allowing Netlify’s Image CDN to optimize images that the original pattern was meant to exclude. The flaw does not alter user data or application code but broadens the set of requests that are automatically processed for performance, potentially leading to unintended bandwidth use and resource consumption.
Affected Systems
The affected product is the Astro web framework’s Netlify adapter, supplied by withastro:astro. Users of any Astro deployment with the Netlify integration on versions older than v8.1.2 are impacted. The issue is tied to the adapter’s handling of image.remotePatterns entries and does not affect other Astro adapters or unrelated services.
Risk and Exploitability
The CVSS score of 3.7 classifies this as a low‑to‑moderate severity flaw; the EPSS score is not available and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector involves supplying crafted image URLs that match the broadened regex, such as appending characters adjacent to a defined pathname, thereby forcing Netlify to process and cache images that were not intended for optimization. Because the vulnerability is purely configuration‑based and depends on the presence of remotePatterns entries, the exploitation risk is limited to environments that use the Astro Netlify adapter and expose mutable URLs. Updating to Astro v8.1.2 or later eliminates the issue, as the fixed code properly escapes pathname metacharacters before adding them to the remote_images allowlist.
OpenCVE Enrichment
Github GHSA