CVE-2024-55948
📋 TL;DR
This vulnerability allows attackers to poison the anonymous cache in Discourse through crafted XHR requests, potentially serving incomplete or manipulated content to anonymous visitors. Only anonymous users are affected, not authenticated users. The issue could lead to degraded user experience or content manipulation.
💻 Affected Systems
- Discourse
📦 What is this software?
Discourse by Discourse
⚠️ Risk & Real-World Impact
Worst Case
Attackers could serve malicious or incomplete content to all anonymous visitors, potentially leading to misinformation, degraded user experience, or manipulation of community discussions.
Likely Case
Attackers poison cache to serve incomplete pages or slightly altered content to anonymous users, causing confusion or minor disruption.
If Mitigated
With proper patching or workarounds, no impact as the vulnerability is eliminated.
🎯 Exploit Status
Requires crafting specific XHR requests to poison cache; no authentication needed.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Latest version of Discourse
Vendor Advisory: https://github.com/discourse/discourse/security/advisories/GHSA-2352-252q-qc82
Restart Required: No
Instructions:
1. Update Discourse to the latest version. 2. Verify the update completed successfully. 3. No restart required for typical deployments.
🔧 Temporary Workarounds
Disable Anonymous Cache
allDisables the anonymous cache entirely to prevent cache poisoning attacks.
export DISCOURSE_DISABLE_ANON_CACHE=true
🧯 If You Can't Patch
- Implement the DISCOURSE_DISABLE_ANON_CACHE environment variable workaround
- Monitor logs for unusual XHR request patterns targeting anonymous endpoints
🔍 How to Verify
Check if Vulnerable:
Check if running a Discourse version before the latest patch and anonymous caching is enabled.
Check Version:
Check Discourse admin panel or run: `discourse --version`
Verify Fix Applied:
Verify Discourse is updated to the latest version and test anonymous page loads for completeness.
📡 Detection & Monitoring
Log Indicators:
- Unusual XHR request patterns to anonymous endpoints
- Cache-related errors in logs
Network Indicators:
- Multiple XHR requests from single IPs targeting anonymous cache endpoints
SIEM Query:
source="discourse" AND (http_method="XHR" OR user_agent="anonymous") AND status_code=200