Ghost, Cross-Site Scripting (XSS) in Portal Component, CVE-2024-XXXXX (Critical)

Listen to this Post

The vulnerability is a DOM-based Cross-Site Scripting (XSS) within the Ghost Portal membership component. The attack vector is a specifically crafted link containing a malicious JavaScript payload. When an authenticated staff user or member clicks this link, the Portal component improperly processes a parameter, allowing the payload to be written directly into the Document Object Model (DOM). This occurs without proper sanitization or encoding. The browser then executes the injected script in the context of the victim’s session. Since the script runs with the permissions of the already-logged-in user, it can perform actions on their behalf. This includes making unauthorized API calls to the Ghost admin or member endpoints, stealing session tokens, modifying account details, or extracting sensitive data, leading to full account compromise. The vulnerability stems from insufficient input validation on user-supplied data within the client-side Portal script before it is reflected and executed.
Platform: Ghost CMS
Version: 5.43.0-5.120.4, 6.0.0-6.14.0
Vulnerability: DOM-based XSS
Severity: Critical
date: 2024-10-28

Prediction: Patch released 2024-10-28

What Undercode Say:

Check Ghost version
ghost version
Scan for vulnerable Portal script in CDN
curl -s https://unpkg.com/@tryghost/portal@latest | grep -n "version"
Example vulnerable parameter simulation (for educational purposes)
echo "Checking for unsafe 'location.hash' or 'document.write' patterns..."
// Proof-of-Concept payload structure (sanitized)
// The exploit involved a link like: https://target-ghost-site.com//portal/account?malicious_param=<script>payload</script>
// The Portal script would take the value from 'malicious_param' and write it to the DOM without sanitization.

How Exploit:

  1. Attacker crafts malicious link with JavaScript payload in a specific parameter.

2. Victim (authenticated user) clicks the link.

  1. Ghost Portal component fetches parameter and uses `innerHTML` or similar unsafe method to update page.
  2. Payload is written into DOM and executed by browser.
  3. Payload sends victim’s session cookie/auth token to attacker server.

Protection from this CVE

  • Upgrade Ghost to v5.121.0+ or v6.15.0+.
  • Ensure Portal loads patched version (v2.51.5+ or v2.57.1+).
  • Implement strict Content Security Policy (CSP).
  • Sanitize all user inputs used in DOM operations.

Impact:

  • Account Takeover
  • Data Breach
  • Session Hijacking

🎯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