Astro: Netlify Image CDN allowlist bypass enables SSRFGHSA-4233-jc72-56c5
Fix: withastro/astro#17752GHSA-4233-jc72-56c5 is a CWE-625 vulnerability in @astrojs/netlify. A fix is available for @astrojs/netlify — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
@astrojs/netlifynpmDescription
Summary
The @astrojs/netlify adapter generated regular expressions for Netlify Image CDN remote-image allowlists without anchoring them to the beginning of the URL. Netlify evaluates these expressions with RegExp.test(), so an allowed image origin appearing anywhere in a URL, including its path or query string, could satisfy the allowlist.
For example, an application allowing images.example.com could accept a source URL such as:
http://127.0.0.1:6379/?url=https://images.example.com/image.png
The allowlist matched the approved origin in the query string, but Netlify parsed and fetched the URL whose actual host was 127.0.0.1.
Impact
An unauthenticated attacker can bypass the configured image.domains or image.remotePatterns allowlist through the public /.netlify/images endpoint and cause Netlify Image CDN to make requests to attacker-selected URLs. This may allow probing or reaching internal services, depending on Netlify's network-level egress protections.
The Image CDN attempts to transform responses as images, which limits direct response exfiltration. No confidentiality or integrity impact has been demonstrated.
Affected versions
@astrojs/netlify versions from 5.2.0 through 8.2.3.
Patches
Fixed in @astrojs/netlify 8.2.4. Generated remote-image allowlist expressions are now anchored to both the beginning and end of the source URL.
Workarounds
Upgrade to @astrojs/netlify 8.2.4 or later. Before upgrading, disable Netlify Image CDN by setting imageCDN: false in the adapter configuration, or remove remote image allowlist entries.
Credits
Reported by @pacocartones.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @astrojs/netlify | ≥ 5.2.0&&< 8.2.4 | 8.2.4npm install @astrojs/netlify@8.2.4 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @astrojs/netlify, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @astrojs/netlify to 8.2.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-4233-jc72-56c5 is resolved across your whole dependency graph.
Workarounds
Restrict outbound requests from the affected component to an allowlist of hosts, block access to link-local and internal address ranges at the network layer, and require authentication on internal services so a forged request cannot reach them unauthenticated.
Frequently Asked Questions
Is GHSA-4233-jc72-56c5 in your dependencies?
Find it across npm, including transitive dependencies.