Astro, Open Redirect Vulnerability, CVE-2024-XXXX (Medium)

Listen to this Post

How the CVE Works

The vulnerability occurs in Astro (v5.12.8) when using the Node adapter in standalone mode with `trailingSlash: “always”` configured. A malformed URL containing a double slash (//) followed by an external domain (e.g., https://example.com//astro.build/press`) triggers an open redirect. The server incorrectly processes the path, redirecting the user to the external domain (//astro.build/press), bypassing the intended fix in GHSA-cq8c-xv66-36gw. This allows phishing attacks by disguising malicious links as legitimate Astro-hosted URLs.
<h2 style="color: blue;">DailyCVE Form</h2>
Platform: Astro
Version: 5.12.8
Vulnerability: Open Redirect
Severity: Medium
Date: 2024-XX-XX
<h2 style="color: blue;">Prediction: Patch by Q3 2024</h2>
<h2 style="color: blue;">What Undercode Say</h2>

Reproduce vulnerability
npm init astro -- --template minimal
npm install @astrojs/[email protected]
echo 'import { defineConfig } from "astro/config"; import node from "@astrojs/node"; export default defineConfig({ trailingSlash: "always", adapter: node({ mode: "standalone" }) });' > astro.config.mjs
astro build
astro preview

<h2 style="color: blue;">How Exploit</h2>
- Craft malicious URL:
http://victim-site.com//evil.com/login`
– Send phishing emails or posts.
– Victims redirected to attacker-controlled domain.

Protection from this CVE

  • Disable `trailingSlash` if unused.
  • Upgrade when patched.
  • Validate URLs server-side.

Impact

  • Phishing attacks.
  • Credential theft.
  • Malware distribution.

🎯Let’s Practice Exploiting & Learn Patching For Free:

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top