Ghost ActivityPub Client, Cross-Site Scripting (XSS), CVE-2026-53950 (High) -DC-Aug2026-1361

Listen to this Post

CVE-2026-53950 is a high-severity Cross-Site Scripting (XSS) vulnerability discovered in the ActivityPub client of the Ghost publishing platform. The vulnerability resides in the `@tryghost/activitypub` package, which serves as Ghost’s social federation client for interacting with the ActivityPub protocol.
The root cause of this vulnerability is a missing input sanitisation step in the ActivityPub client’s post processing pipeline. When Ghost receives a post from a federated ActivityPub server, the client does not properly neutralise the content before rendering it in the victim’s browser. A maliciously customised ActivityPub server can embed executable JavaScript code within the post content. When a Ghost user views that post, the injected script executes in the context of the victim’s browser session.
The vulnerability affects all versions of the `@tryghost/activitypub` package up to and including v3.0.8. This means any Ghost instance running versions prior to 3.1.0 that has the ActivityPub client enabled is vulnerable.
The attack vector requires user interaction—a victim must view a post shared from a malicious ActivityPub server. However, the attack complexity is rated as High because the attacker must first successfully deploy a customised ActivityPub server and have the victim subscribe to or view content from it. The CVSS 3.1 base score is 7.5 (High) , with the vector string: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H.
The fix was implemented in `@tryghost/activitypub` v3.1.0, which is automatically fetched by Ghost. The patch introduces proper HTML sanitisation using `sanitizeHtml()` with DOMPurify on all content rendered via dangerouslySetInnerHTML, effectively neutralising any embedded malicious scripts. Ghost publicly thanked Brad Geesaman of Ghost Security for responsibly disclosing this vulnerability.
Successful exploitation can lead to session cookie theft, account takeover, arbitrary actions performed on behalf of the victim, defacement of the Ghost instance, and further compromise of the underlying CMS.

DailyCVE Form

Platform: Ghost / @tryghost/activitypub
Version: < 3.1.0
Vulnerability: XSS / JS Injection
Severity: High (7.5 CVSS)
Date: 2026-06-24

Prediction: Patch expected 2026-06-24

What Undercode Say: Analytics

Vulnerability Type: CWE-79: Improper Neutralization of Input During Web Page Generation (‘Cross-site Scripting’)

Affected Component: `@tryghost/activitypub` npm package

Fix Version: v3.1.0

CVSS Vector: `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`

EPSS Score: 0.2% (top 89%)

CISA KEV: Not listed

Attack Prerequisites: Malicious ActivityPub server + victim views post

Patch Availability: Automatic fetch by Ghost

Discovered By: Brad Geesaman, Ghost Security

Check current @tryghost/activitypub version
npm list @tryghost/activitypub
Upgrade to patched version
npm install @tryghost/[email protected]
Verify Ghost version
ghost version
Restart Ghost after upgrade
ghost restart
// Vulnerable code pattern (pre-3.1.0) - missing sanitisation
// In the ActivityPub client's post renderer:

<div dangerouslySetInnerHTML={{ __html: post.content }} />

// Patched code (v3.1.0) - with DOMPurify sanitisation
import DOMPurify from 'dompurify';
const sanitizedContent = DOMPurify.sanitize(post.content);

<div dangerouslySetInnerHTML={{ __html: sanitizedContent }} />

How Exploit:

  1. Deploy a malicious ActivityPub server customised to inject JavaScript payloads into post content fields.

2. Craft a post containing embedded JavaScript, e.g.:

<script>fetch('/ghost/api/admin/session');</script>

or more sophisticated payloads targeting session cookies or admin actions.
3. Federate the post to a vulnerable Ghost instance running `@tryghost/activitypub` < 3.1.0.
4. Wait for a victim user to view the malicious post within the Ghost interface.
5. The injected JavaScript executes in the victim’s browser context, allowing the attacker to:
– Steal session cookies and hijack user sessions
– Perform actions on behalf of the victim (e.g., create admin users, modify content)
– Deface the Ghost instance
– Exfiltrate sensitive data from the CMS

Protection:

  • Immediate: Upgrade `@tryghost/activitypub` to v3.1.0 or later
  • Automatic: Ghost automatically fetches the patched package
  • Temporary Workaround: Disable or restrict federation with untrusted ActivityPub servers until the patch is applied
  • Defensive: Deploy a Web Application Firewall (WAF) or Content Security Policy (CSP) that blocks inline scripts and alerts on unexpected script tags in ActivityPub payloads
  • Verification: Run `npm list @tryghost/activitypub` to confirm version ≥ 3.1.0
  • Monitoring: Review Ghost logs for unusual ActivityPub activity or unexpected script tags in federated content

Impact

  • Confidentiality: High — attacker can steal session cookies, access tokens, and sensitive CMS data
  • Integrity: High — attacker can perform arbitrary actions on behalf of the victim, including creating, modifying, or deleting content and user accounts
  • Availability: High — attacker could deface the instance, delete critical content, or disrupt CMS operations
  • User Interaction: Required — victim must view a malicious post from a federated server
  • Attack Complexity: High — requires deployment of a custom ActivityPub server
  • Scope: Unchanged — the exploited component’s security boundaries are not crossed
  • No known active exploits in the wild as of the advisory publication

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

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands

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