CVE-2025-62605
Executive Summary
CVE-2025-62605 is a vulnerability in Mastodon, a free, open-source social network server based on ActivityPub. The flaw resides in the quote post feature introduced in version 4.4. An attacker can bypass quote controls by reblogging a post and then quoting their own reblog. This allows the attacker to display a preview of the original post with all affordances (e.g., reply, boost, favorite) that the original author intended to restrict via quote controls. The vulnerability has a CVSS score of 4.3 (Medium) and is patched in versions 4.4.8 and 4.5.0-beta.2.
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.
No signup required
Supply Chain & Package Security
This vulnerability is specific to the Mastodon application itself, not a dependency. However, Mastodon is a Ruby on Rails application. Administrators should ensure they are running a patched version of the Mastodon source code. No malicious packages or compromised dependencies have been identified in relation to this CVE.
CVSS Breakdown & Threat Level
- CVSS Score: 4.3 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- Attack Vector (AV): Network (N) – The attack is exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): None (N) – The attacker does not need an account on the target instance.
- User Interaction (UI): Required (R) – The victim must view the crafted quote post.
- Scope (S): Unchanged (U) – The vulnerability does not affect other components.
- Confidentiality (C): Low (L) – The attacker can view the content of a post that was intended to be protected.
- Integrity (I): Low (L) – The attacker can manipulate the display of the post (e.g., showing a preview).
- Availability (A): None (N) – No impact on system availability.
Threat Level: Medium. The attack requires user interaction and only allows bypassing of quote controls, not full account compromise or data exfiltration.
Deep Dive & Mechanics
The vulnerability stems from how Mastodon internally handles reblogs. In Mastodon, a reblog (boost) is treated as a status object. When quote controls were added in version 4.4, the system was designed to check if a user had permission to quote a specific post. However, the check was not applied to reblogs.
Attack Flow:
- An attacker identifies a post on a Mastodon instance that has quote controls enabled (e.g., the author has restricted who can quote the post).
- The attacker reblogs (boosts) the target post. This creates a new status object representing the reblog.
- The attacker then creates a quote post, but instead of quoting the original post, they quote their own reblog status.
- The system checks the quote controls against the reblog status (which belongs to the attacker), not the original post. Since the attacker owns the reblog, the check passes.
- The quote post displays a preview of the original post, including all affordances (reply, boost, favorite), effectively bypassing the original author's quote controls.
Root Cause: The lack of special treatment for reblogs in the quote control logic. The system should have recognized that quoting a reblog is equivalent to quoting the original post and enforced the original post's quote controls.
Vulnerable vs. Patched Code
The vulnerable code is in the quote control validation logic. The exact code is not publicly available, but the fix involves adding a check to see if the quoted status is a reblog and, if so, applying the original post's quote controls.
Vulnerable Logic (Pseudocode):
def can_quote?(status, user)
# Check if user is allowed to quote the status
return true if status.quote_controls.nil?
# ... check quote controls ...
end
Patched Logic (Pseudocode):
def can_quote?(status, user)
# If the status is a reblog, use the original status for quote control checks
original_status = status.reblog? ? status.reblog : status
return true if original_status.quote_controls.nil?
# ... check quote controls against original_status ...
end
Exploitation & Lab Setup
Red Team
Prerequisites:
- A Mastodon instance running version 4.4.x (before 4.4.8) or 4.5.0-beta.1.
- A target post with quote controls enabled (e.g., only followers can quote).
- An attacker account on the same or a different instance (if federation is enabled).
Exploitation Steps:
- Identify a target post with quote controls. For example, a post from user
victim@example.comwithquote_controls: followers_only. - As the attacker, reblog the target post:
POST /api/v1/statuses/12345/reblog HTTP/1.1 Host: mastodon.example.com Authorization: Bearer <attacker_token> - Note the ID of the reblog status (e.g.,
67890). - Create a quote post referencing the reblog:
POST /api/v1/statuses HTTP/1.1 Host: mastodon.example.com Authorization: Bearer <attacker_token> Content-Type: application/json { "status": "Look at this!", "quote_id": "67890" } - The quote post will display a preview of the original post, including reply, boost, and favorite buttons, bypassing the
followers_onlyrestriction.
Blue Team
Detection:
- Monitor for reblogs followed immediately by quote posts from the same user.
- Look for quote posts where the
quote_idpoints to a reblog status rather than an original post. - Audit logs for unusual patterns of reblog and quote creation.
Hunting Query (Elasticsearch):
{
"query": {
"bool": {
"must": [
{ "term": { "event.action": "create" } },
{ "term": { "event.category": "web" } },
{ "match": { "url.path": "/api/v1/statuses" } }
],
"filter": [
{ "exists": { "field": "request.body.quote_id" } }
]
}
}
}
Lab Setup:
- Deploy a vulnerable Mastodon instance using Docker:
git clone https://github.com/mastodon/mastodon.git cd mastodon git checkout v4.4.0 docker-compose up -d - Create two accounts: one as the victim (with quote controls enabled) and one as the attacker.
- Follow the Red Team steps to reproduce the vulnerability.
Indicators of Compromise (IOCs)
- Network:
- HTTP POST requests to
/api/v1/statuseswith aquote_idparameter that references a reblog status. - HTTP POST requests to
/api/v1/statuses/{id}/reblogfollowed by a quote post creation within a short time window.
- HTTP POST requests to
- Logs:
- Application logs showing a reblog creation followed by a quote creation from the same user.
- Audit logs for
status.createevents wherequote_idis present and the referenced status is a reblog.
- File System:
- No specific file system IOCs.
Detection Engineering
YARA Rule
rule CVE_2025_62605_Mastodon_Quote_Bypass {
meta:
description = "Detects Mastodon quote posts that bypass quote controls by quoting a reblog"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-62605"
strings:
$reblog_endpoint = "/api/v1/statuses/" ascii wide nocase
$quote_id = "quote_id" ascii wide nocase
$reblog_action = "/reblog" ascii wide nocase
condition:
all of them
}
Sigma Rule
title: Mastodon Quote Control Bypass via Reblog
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects HTTP requests that attempt to bypass quote controls by quoting a reblog
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: nginx
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/api/v1/statuses'
cs-uri-query|contains: 'quote_id'
condition: selection
falsepositives:
- Legitimate use of quote feature on reblogs (if allowed by instance policy)
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-62605 Mastodon Quote Control Bypass"; flow:to_server,established; content:"POST"; http_method; content:"/api/v1/statuses"; http_uri; content:"quote_id"; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade Mastodon to version 4.4.8 or 4.5.0-beta.2 (or later).
- If upgrade is not immediately possible, disable the quote post feature:
# In config/settings.yml or environment QUOTE_ENABLED: false - Monitor for suspicious reblog and quote activity.
Long-Term Mitigations:
- Implement rate limiting on reblog and quote creation endpoints.
- Add logging and alerting for quote posts that reference reblogs.
- Conduct a code review of the quote control logic to ensure all status types are properly handled.
Patch Details:
- The fix is included in Mastodon versions 4.4.8 and 4.5.0-beta.2.
- The patch modifies the quote control validation to check the original status when the quoted status is a reblog.
Valters IT
Securing Digital Frontiers