CVE-2025-58055

4.3 MEDIUM

📋 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

Products:
  • Discourse
Versions: 3.5.0 and below
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires AI helper feature enabled and authenticated user access.

📦 What is this software?

⚠️ 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.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

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

all

Limit 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

📤 Share & Export