GHSA-hp3v-mfqw-h74c: @astrojs/netlify generates an overly-broad Netlify Image CDN allowlist because remotePatterns.pathname metacharacters are not escaped
(updated )
The @astrojs/netlify adapter converts each image.remotePatterns entry into a regular expression that is written to .netlify/v1/config.json under images.remote_images. Netlify’s Image CDN uses these regexes as the allowlist that decides which remote image URLs it will optimize. remotePatternToRegex() escapes . in the hostname but interpolates the literal pathname into the regex without escaping regex metacharacters. As a result, the generated allowlist is broader than the pattern the developer declared, and broader than Astro’s canonical matchPattern() helper (which compares non-wildcard pathnames by exact string equality).
This is a residual of the same bug class addressed in CVE-2026-54300 (PR #17018, commit 1310277d). That fix corrected wildcard semantics and added a $ anchor but did not add metacharacter escaping for literal pathnames.
References
- github.com/advisories/GHSA-529g-xq4f-cw38
- github.com/advisories/GHSA-hp3v-mfqw-h74c
- github.com/withastro/astro/commit/ee74c289bfe32fb6a7f59ed97c5c22db16394b72
- github.com/withastro/astro/pull/17018
- github.com/withastro/astro/pull/17368
- github.com/withastro/astro/releases/tag/@astrojs/netlify@8.1.2
- github.com/withastro/astro/security/advisories/GHSA-hp3v-mfqw-h74c
- nvd.nist.gov/vuln/detail/CVE-2026-73425
Code Behaviors & Features
Detect and mitigate GHSA-hp3v-mfqw-h74c with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →