CVE-2025-23023

8.2 HIGH

📋 TL;DR

This vulnerability allows attackers to poison the anonymous cache in Discourse by crafting requests with specific headers, potentially causing visitors to receive incomplete or incorrect page content. Only anonymous visitors are affected, not logged-in users. The issue has been patched in the latest Discourse version.

💻 Affected Systems

Products:
  • Discourse
Versions: All versions before the patch
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects anonymous cache; logged-in users are not impacted. Requires anonymous caching to be enabled.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could serve malicious or incomplete content to all anonymous visitors, potentially leading to misinformation, broken functionality, or phishing attempts.

🟠

Likely Case

Anonymous visitors may experience missing page elements, broken functionality, or inconsistent content delivery.

🟢

If Mitigated

With proper patching or workarounds, no impact on site visitors.

🌐 Internet-Facing: HIGH
🏢 Internal Only: LOW

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires crafting specific HTTP headers and understanding Discourse's caching mechanism.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Latest version of Discourse

Vendor Advisory: https://github.com/discourse/discourse/security/advisories/GHSA-5h4h-2f46-r3c7

Restart Required: No

Instructions:

1. Update Discourse to the latest version. 2. No restart required as Discourse typically handles updates automatically.

🔧 Temporary Workarounds

Disable Anonymous Cache

all

Disables the vulnerable anonymous caching feature entirely

export DISCOURSE_DISABLE_ANON_CACHE=true

🧯 If You Can't Patch

  • Implement the DISCOURSE_DISABLE_ANON_CACHE environment variable workaround
  • Consider implementing a WAF rule to block suspicious header patterns

🔍 How to Verify

Check if Vulnerable:

Check if running a pre-patch version of Discourse with anonymous caching enabled

Check Version:

Check Discourse admin panel or run: docker exec discourse cat /shared/version

Verify Fix Applied:

Verify Discourse version is updated to latest and/or DISCOURSE_DISABLE_ANON_CACHE is set

📡 Detection & Monitoring

Log Indicators:

  • Unusual cache miss/hit patterns for anonymous users
  • Requests with unusual header combinations

Network Indicators:

  • HTTP requests with crafted headers targeting anonymous endpoints

SIEM Query:

http.headers contains unusual patterns AND http.user_agent contains anonymous

🔗 References

📤 Share & Export