☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-62176

CVE-2025-62176 Supply Chain Attack in Mastodon
📅 PUBLISHED: 2025-10-13 21:04 UTC 🔄 UPDATED: 2026-09-23 20:35 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.27%
👁️
0.27% probability
6.7× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
4.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-62176 is a vulnerability in Mastodon, a free, open-source social network server based on ActivityPub. The flaw resides in the streaming server, which incorrectly accepts authentication tokens lacking the read:statuses scope for subscribing to public timeline events. This allows OAuth clients with a valid token but insufficient permissions to receive new public posts from public timelines. The impact is limited to public posts and requires a valid token, but it can lead to unexpected data access in limited-federation environments. The vulnerability has been patched in Mastodon versions 4.4.6, 4.3.14, and 4.2.27.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not directly related to a package manager (NPM, PyPI, Go, Ruby) but affects the Mastodon Ruby on Rails application. The streaming server component is a Node.js process, and the issue involves OAuth token scope validation. Organizations using Mastodon should ensure they are running a patched version.

CVSS Breakdown & Threat Level

  • CVSS Score: 4.3 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: Low (valid OAuth token)
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: Low (public posts)
  • Integrity Impact: None
  • Availability Impact: None

The threat level is medium due to the low complexity and requirement for a valid token. The impact is limited to reading public posts, which are already public, but the vulnerability bypasses intended access controls.

Deep Dive & Mechanics

The Mastodon streaming server is a separate Node.js process that handles WebSocket connections for real-time updates. It uses OAuth tokens for authentication and authorization. The vulnerability occurs because the streaming server does not properly validate the read:statuses scope when a client subscribes to public timeline events.

Root Cause: The streaming server checks for a valid token but does not enforce the read:statuses scope for public channels. This allows any client with a valid token (e.g., one with only write scope) to subscribe to public timelines and receive new posts.

Attack Flow:

  1. An attacker obtains a valid OAuth token for any Mastodon application (e.g., a malicious app or a compromised token).
  2. The attacker connects to the streaming server's WebSocket endpoint (e.g., wss://mastodon.example.com/api/v1/streaming).
  3. The attacker subscribes to a public timeline (e.g., public:local or public:remote).
  4. The streaming server accepts the subscription without verifying the read:statuses scope.
  5. The attacker receives new public posts in real-time.

Impact: In a limited-federation setting (e.g., a private Mastodon instance), public posts may be intended only for users of that instance. This vulnerability allows an external client with a valid token to access those posts, bypassing the intended access control.

Vulnerable vs. Patched Code

The vulnerable code is in the streaming server's WebSocket authentication logic. The patched version adds a scope check for read:statuses when subscribing to public channels.

Vulnerable Code (Conceptual):

// Vulnerable: Only checks token validity, not scope
function authenticate(token, channel) {
  if (isValidToken(token)) {
    return true; // No scope check for public channels
  }
  return false;
}

Patched Code (Conceptual):

// Patched: Checks token validity and scope for public channels
function authenticate(token, channel) {
  if (isValidToken(token)) {
    if (channel.startsWith('public') && !hasScope(token, 'read:statuses')) {
      return false; // Deny if missing read:statuses scope
    }
    return true;
  }
  return false;
}

Exploitation & Lab Setup

Red Team

Prerequisites:

  • A valid OAuth token for a Mastodon application (e.g., from a registered app).
  • Access to the Mastodon instance's streaming endpoint.

Exploitation Steps:

  1. Obtain a valid OAuth token. For example, register a malicious app and get a token with write scope only.
  2. Use a WebSocket client (e.g., wscat or a custom script) to connect to the streaming server.
  3. Subscribe to a public timeline.

Example using wscat:

wscat -c "wss://mastodon.example.com/api/v1/streaming?access_token=YOUR_TOKEN&stream=public:local"

Example using Python:

import websocket
import json

token = "YOUR_TOKEN"
url = f"wss://mastodon.example.com/api/v1/streaming?access_token={token}&stream=public:local"

def on_message(ws, message):
    print("Received:", message)

ws = websocket.WebSocketApp(url, on_message=on_message)
ws.run_forever()

Expected Result: The attacker receives new public posts in real-time, even though the token lacks read:statuses scope.

Blue Team

Detection:

  • Monitor WebSocket connections to the streaming server for tokens with unexpected scopes.
  • Log and alert on subscriptions to public channels by tokens that do not have read:statuses scope.

Hunting:

  • Search for WebSocket connections to /api/v1/streaming with stream=public:* parameters.
  • Correlate with OAuth token scopes to identify anomalies.

Lab Setup:

  • Deploy a vulnerable Mastodon instance (version < 4.4.6) in a controlled environment.
  • Create a test application with a token that has only write scope.
  • Use the exploitation steps above to verify the vulnerability.
  • Then upgrade to a patched version and confirm the fix.

Indicators of Compromise (IOCs)

  • Network: WebSocket connections to /api/v1/streaming with stream=public:local or stream=public:remote using tokens without read:statuses scope.
  • Logs: Streaming server logs showing subscriptions to public channels by tokens with insufficient scopes.
  • Token: OAuth tokens that are valid but lack read:statuses scope being used for public timeline subscriptions.

Detection Engineering

YARA Rule

rule CVE_2025_62176_Mastodon_Streaming_Scope_Bypass {
    meta:
        description = "Detects Mastodon streaming server log entries indicating scope bypass"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-62176"
    strings:
        $log1 = "subscribe" nocase
        $log2 = "public:local" nocase
        $log3 = "public:remote" nocase
        $log4 = "read:statuses" nocase
    condition:
        ($log1 and ($log2 or $log3)) and not $log4
}

Sigma Rule

title: Mastodon Streaming Server Scope Bypass
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects WebSocket connections to Mastodon streaming server with public timeline subscriptions using tokens lacking read:statuses scope
author: Valters IT
date: 2025-04-10
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2025-62176
logsource:
    category: webserver
    product: mastodon
detection:
    selection:
        cs-uri-query|contains:
            - "stream=public:local"
            - "stream=public:remote"
        cs-uri-query|contains: "access_token="
    filter:
        cs-uri-query|contains: "read:statuses"
    condition: selection and not filter
falsepositives:
    - Legitimate clients with read:statuses scope
level: medium

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-62176 Mastodon Streaming Scope Bypass"; flow:to_server; content:"/api/v1/streaming"; http_uri; content:"stream=public:"; http_uri; content:"access_token="; http_uri; pcre:"/read:statuses/"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade Mastodon to version 4.4.6, 4.3.14, or 4.2.27 (or later).
  2. If immediate upgrade is not possible, restrict access to the streaming server using network controls (e.g., firewall rules) to trusted IPs only.
  3. Review and revoke OAuth tokens that may have been used inappropriately.

Long-term Measures:

  • Implement strict OAuth scope validation for all API endpoints.
  • Monitor streaming server logs for anomalous subscriptions.
  • Conduct regular security audits of OAuth token usage.

Workarounds:

  • No known workarounds exist. Patching is the only solution.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-62176/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.