CVE-2025-62176

4.3 MEDIUM

📋 TL;DR

Mastodon's streaming server incorrectly allows OAuth clients with valid authentication tokens to subscribe to public timeline events even when those tokens lack the required read:statuses scope. This allows unauthorized access to new public posts in limited-federation settings. Only Mastodon instances running vulnerable versions are affected.

💻 Affected Systems

Products:
  • Mastodon
Versions: All versions before 4.4.6, 4.3.14, and 4.2.27
Operating Systems: All platforms running Mastodon
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects instances with streaming server enabled (default configuration). Impact is greater in limited-federation settings where public posts have restricted visibility.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Malicious OAuth clients could monitor all new public posts across federated instances in real-time without proper authorization, potentially enabling surveillance or data harvesting.

🟠

Likely Case

Accidental or unintended access to public timeline events by OAuth clients that shouldn't have read permissions, potentially violating access control policies.

🟢

If Mitigated

Limited to monitoring only new public posts (not historical data) and requires a valid authentication token, reducing overall impact.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: LOW

🎯 Exploit Status

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

Requires obtaining a valid OAuth token (though without read:statuses scope) and understanding Mastodon's streaming API. No public exploit code available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.4.6, 4.3.14, or 4.2.27

Vendor Advisory: https://github.com/mastodon/mastodon/security/advisories/GHSA-7gwh-mw97-qjgp

Restart Required: No

Instructions:

1. Backup your Mastodon instance. 2. Update to the patched version using your preferred method (git pull, package manager, or Docker). 3. Run database migrations if required. 4. Restart Mastodon services.

🔧 Temporary Workarounds

No workarounds available

all

The vendor advisory states no known workarounds exist. Patching is the only solution.

🧯 If You Can't Patch

  • Disable the streaming server functionality if not required (may break real-time features).
  • Implement network-level restrictions to limit access to streaming endpoints to trusted clients only.

🔍 How to Verify

Check if Vulnerable:

Check your Mastodon version. If it's earlier than 4.4.6, 4.3.14, or 4.2.27, you are vulnerable.

Check Version:

RAILS_ENV=production bundle exec rails runner 'puts Mastodon::Version.to_s'

Verify Fix Applied:

Confirm your Mastodon version is 4.4.6, 4.3.14, or 4.2.27 or later. Test that OAuth tokens without read:statuses scope cannot subscribe to public timeline events.

📡 Detection & Monitoring

Log Indicators:

  • Unusual streaming API requests from OAuth clients without read:statuses scope.
  • Multiple failed authorization attempts followed by successful streaming connections.

Network Indicators:

  • Unexpected connections to streaming endpoints (/api/v1/streaming) from unauthorized clients.
  • High volume of WebSocket connections to public timeline endpoints.

SIEM Query:

source="mastodon.log" AND ("streaming" OR "/api/v1/streaming") AND NOT "scope=read:statuses"

🔗 References

📤 Share & Export