CVE-2025-58055
📋 TL;DR
Discourse versions 3.5.0 and below contain an authorization bypass vulnerability in AI suggestion endpoints. Authenticated users can access restricted topic information by manipulating topic_id parameters in API requests. This affects all Discourse instances running vulnerable versions.
💻 Affected Systems
- Discourse
📦 What is this software?
Discourse by Discourse
Discourse by Discourse
Discourse by Discourse
⚠️ Risk & Real-World Impact
Worst Case
Unauthorized disclosure of sensitive topic content, potentially exposing private discussions, confidential information, or restricted community content.
Likely Case
Limited information disclosure of topic titles, categories, and tags from restricted forums that authenticated users shouldn't access.
If Mitigated
No information disclosure if proper access controls are enforced or workarounds implemented.
🎯 Exploit Status
Exploitation requires authenticated access and knowledge of restricted topic IDs.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 3.5.1
Vendor Advisory: https://github.com/discourse/discourse/security/advisories/GHSA-32v2-x274-vfhr
Restart Required: Yes
Instructions:
1. Backup your Discourse instance. 2. Update to Discourse version 3.5.1 or later. 3. Restart the application. 4. Verify the update completed successfully.
🔧 Temporary Workarounds
Restrict AI Helper Access
allLimit AI helper feature access to specific user groups through site settings.
rails console
SiteSetting.composer_ai_helper_allowed_groups = '1,2,3'
SiteSetting.post_ai_helper_allowed_groups = '1,2,3'
🧯 If You Can't Patch
- Disable AI helper features completely through site settings
- Implement network-level access controls to restrict API endpoint access
🔍 How to Verify
Check if Vulnerable:
Check Discourse version via admin panel or run: `cd /var/discourse && ./launcher status app`
Check Version:
cd /var/discourse && ./launcher status app | grep version
Verify Fix Applied:
Confirm version is 3.5.1 or higher and test AI suggestion endpoints with unauthorized topic IDs.
📡 Detection & Monitoring
Log Indicators:
- Multiple failed authorization attempts to AI suggestion endpoints
- Unusual pattern of topic_id parameter values in API requests
Network Indicators:
- Unusual volume of requests to /ai-helper endpoints
- Requests with sequential or out-of-range topic_id values
SIEM Query:
source="discourse_logs" AND (uri_path="/ai-helper/*" OR endpoint="ai_suggestion") AND status=200 AND user_group NOT IN ["admin","trusted"]
🔗 References
- https://github.com/discourse/discourse/commit/28d569cae9b33cd55d647bf41806106e33d975c9
- https://github.com/discourse/discourse/security/advisories/GHSA-32v2-x274-vfhr
- https://www.vicarius.io/vsociety/posts/cve-2025-58055-detect-discourse-vulnerability
- https://www.vicarius.io/vsociety/posts/cve-2025-58055-mitigate-discourse-vulnerability