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

CVE-2025-27399

CVE-2025-27399 Information Disclosure in Mastodon
📅 PUBLISHED: 2025-02-27 17:15 UTC 🔄 UPDATED: 2026-09-23 20:31 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.36%
👁️
0.36% probability
8.9× 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
5.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-27399 is a vulnerability in the Mastodon decentralized social media platform that allows unapproved users to view domain block reasons when the visibility setting is configured to "logged-in users." This information disclosure flaw impacts instance administrators who rely on the "users" visibility setting to keep their domain block reasons private from the general public but accessible to authenticated members. The vulnerability is present in all Mastodon versions prior to 4.1.23, 4.2.16, and 4.3.4. The CVSS score is 5.3 (Medium), and the EPSS probability is 0.0%, indicating a low likelihood of active exploitation in the wild. The patch is available, and upgrading to the fixed versions resolves the issue.

⚡ 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

Mastodon is a Ruby on Rails application distributed via GitHub and Docker. The vulnerability is in the application logic, not in a third-party package. Administrators should verify the integrity of their Mastodon installation by checking the source code against the official repository and ensuring no unauthorized modifications have been made. The fix is included in the standard release process, and no additional package updates are required.

CVSS Breakdown & Threat Level

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

The vulnerability is rated Medium because it allows unauthenticated, unapproved users to access sensitive information (domain block reasons) that should only be visible to logged-in users. The attack complexity is low, and no user interaction is required. The impact is limited to confidentiality, with no effect on integrity or availability.

Deep Dive & Mechanics

The vulnerability exists in the authorization logic for viewing domain block reasons. Mastodon allows administrators to set the visibility of domain blocks and their reasons to one of three levels: "public," "users" (logged-in users), or "admins." When set to "users," the intended behavior is that only authenticated users who have been approved by the instance admin can view the block reasons. However, due to a flaw in the access control check, users who are in a pending approval state (i.e., they have registered but not yet been approved) are incorrectly granted access to this information.

The root cause is that the authorization check does not properly verify the user's approval status. It only checks if the user is logged in, without confirming that the user's account has been approved by an administrator. This allows unapproved users to bypass the intended restriction and view sensitive information about domain blocks, which could reveal the instance's moderation policies and potentially expose sensitive data about blocked domains.

The fix involves adding an additional check to ensure that the user's account status is "approved" before granting access to the block reasons. This is implemented in the authorization logic, likely in the controller or policy layer of the Rails application.

Vulnerable vs. Patched Code

The vulnerable code likely resides in the authorization logic for the domain blocks controller. The following is a conceptual representation of the vulnerable and patched code.

Vulnerable Code (Ruby on Rails):

# app/controllers/admin/domain_blocks_controller.rb
class Admin::DomainBlocksController < ApplicationController
  before_action :authenticate_user!

  def show
    @domain_block = DomainBlock.find(params[:id])
    authorize @domain_block, :show?
    # ... render view
  end
end
# app/policies/domain_block_policy.rb
class DomainBlockPolicy < ApplicationPolicy
  def show?
    # Vulnerable: Only checks if user is logged in, not if approved
    user.present?
  end
end

Patched Code (Ruby on Rails):

# app/policies/domain_block_policy.rb
class DomainBlockPolicy < ApplicationPolicy
  def show?
    # Patched: Checks if user is logged in AND approved
    user.present? && user.approved?
  end
end

The patched code adds a check for user.approved? to ensure that only approved users can view the block reasons. This prevents unapproved users from accessing the information.

Exploitation & Lab Setup

Red Team

To exploit this vulnerability, an attacker would:

  1. Identify a Mastodon instance that has domain block reasons set to "users" visibility.
  2. Register a new account on the instance. The account will be in a pending approval state.
  3. Without waiting for approval, navigate to the domain blocks page (e.g., /admin/domain_blocks or a public-facing endpoint that lists blocks).
  4. The attacker will be able to view the block reasons, which should have been hidden from unapproved users.

Proof of Concept (Conceptual):

# Step 1: Register a new user (using curl or a script)
curl -X POST https://mastodon.example.com/api/v1/accounts \
  -d "username=attacker&email=attacker@example.com&password=password123&agreement=true&locale=en"

# Step 2: Attempt to access domain blocks (assuming the endpoint is /api/v1/instance/domain_blocks)
curl -H "Authorization: Bearer <token_from_registration>" \
  https://mastodon.example.com/api/v1/instance/domain_blocks

If the instance is vulnerable, the response will include the block reasons. If patched, the response will either be empty or return a 403 Forbidden error.

Blue Team

To detect exploitation attempts, blue teams should:

  1. Monitor for requests to domain block endpoints from unapproved users.
  2. Look for patterns of rapid account registration followed by attempts to access administrative or sensitive endpoints.
  3. Review logs for 403 errors on domain block endpoints, which may indicate blocked exploitation attempts.

Detection Logic:

  • Monitor access logs for requests to /admin/domain_blocks or /api/v1/instance/domain_blocks from users with a pending approval status.
  • Alert on multiple failed attempts to access these endpoints from the same IP address.

Indicators of Compromise (IOCs)

  • Network Indicators:
    • Requests to /admin/domain_blocks or /api/v1/instance/domain_blocks from unapproved users.
    • Unusual patterns of account registration followed by immediate access to sensitive endpoints.
  • System Indicators:
    • Log entries showing access to domain block endpoints by users with pending status.
    • Changes to the users.approved field in the database (should not be modified by normal user actions).
  • File Indicators:
    • Modified authorization policies (e.g., domain_block_policy.rb) that do not include the approved? check.

Detection Engineering

YARA Rule

rule Detect_CVE_2025_27399_Exploit {
    meta:
        description = "Detects attempts to exploit CVE-2025-27399 by accessing domain block endpoints without approval"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-27399"
        severity = "medium"
    strings:
        $s1 = "/admin/domain_blocks" ascii wide nocase
        $s2 = "/api/v1/instance/domain_blocks" ascii wide nocase
        $s3 = "domain_block" ascii wide nocase
    condition:
        any of ($s*) and #s3 > 2
}

Sigma Rule

title: CVE-2025-27399 - Unapproved User Access to Domain Blocks
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects access to Mastodon domain block endpoints by unapproved users
author: Valters IT
date: 2025-04-10
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2025-27399
logsource:
    category: webserver
    product: nginx
    service: access
detection:
    selection:
        cs-uri-query:
            - "/admin/domain_blocks*"
            - "/api/v1/instance/domain_blocks*"
    condition: selection
falsepositives:
    - Legitimate admin access
level: medium

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-27399 - Unapproved User Access to Domain Blocks"; flow:to_server,established; content:"/admin/domain_blocks"; http_uri; nocase; content:"/api/v1/instance/domain_blocks"; http_uri; nocase; classtype:attempted-recon; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade Mastodon: Upgrade to version 4.1.23, 4.2.16, or 4.3.4 (or later) as soon as possible. This is the only complete fix.
  2. Verify User Approval: If upgrading is not immediately possible, manually review all pending user registrations and either approve or reject them. This reduces the attack surface but does not fully patch the vulnerability.
  3. Change Visibility Setting: Temporarily change the domain block visibility setting to "admins" only. This will prevent all non-admin users from viewing block reasons, but it may impact legitimate users.

Long-Term Mitigations:

  1. Implement Monitoring: Deploy the detection rules provided in this report to monitor for exploitation attempts.
  2. Review Access Controls: Conduct a thorough review of all authorization policies in the Mastodon codebase to ensure similar vulnerabilities do not exist elsewhere.
  3. Enable Two-Factor Authentication: While not directly related to this vulnerability, enabling 2FA for all users can reduce the risk of account compromise.

Workarounds:

  • If upgrading is delayed, consider using a Web Application Firewall (WAF) to block requests to /admin/domain_blocks and /api/v1/instance/domain_blocks from unauthenticated users. However, this may break legitimate functionality.

Valters IT
DevSecOps & Cyber Threat Intelligence Division
Report generated for CVE-2025-27399

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-27399/ · 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.