☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 7.4 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N 🐛 CWE-707
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2023-42451

CVE-2023-42451 — Mastodon Invalid Domain Name Normalization vulnerability
📅 PUBLISHED: 2023-09-19 00:00 UTC 🔄 UPDATED: 2026-08-13 05:46 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: Fixed in 3.5.14, 4.0.10, 4.1.8, 4.2.0-rc2
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.57%
👁️
0.57% probability
14.3× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Affected: < 3.5.14, >= 4.0.0 < 4.0.10, >= 4.1.0 < 4.1.8, < 4.2.0-rc2 — upgrade to patched release
CVSS VECTOR BREAKDOWN 7.4
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: R User Interaction Required
S: U Scope Unchanged
C: H Confidentiality High
I: N Integrity None
A: N Availability None
7.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-42451 is a domain name normalization flaw in Mastodon, the free and open-source social network server based on the ActivityPub protocol. Prior to versions 3.5.14, 4.0.10, 4.1.8, and 4.2.0-rc2, an attacker could manipulate domain name normalization logic to spoof domains they do not own, enabling impersonation of other federated instances under certain circumstances. The vulnerability carries a CVSS score of 7.4 and is considered likely patched based on two independent confirmation sources, though no public proof-of-concept or exploitation-in-the-wild evidence has been reported at the time of this writing.

⚡ 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

Technical Analysis

Vulnerability Class and Mechanism

CVE-2023-42451 falls under the general class of input validation and normalization flaws, specifically affecting how Mastodon processes and normalizes domain names during federation. The vulnerability exists in Mastodon's domain name normalization routines — the code paths responsible for converting, canonicalizing, or standardizing domain strings before they are used in identity verification, access control decisions, or federation trust logic.

The attack surface is Mastodon's federation layer, which processes ActivityPub messages from remote instances. The normalization flaw can be triggered when a malicious actor submits a domain in a non-canonical form — for example, using alternative Unicode representations, unusual ASCII encoding, or mixed-case/homoglyph permutations — that the normalization routine fails to collapse into a single canonical form. When this inconsistency occurs, Mastodon may treat two logically identical domains as distinct, or conversely, treat two distinct domains as identical, depending on how the normalization bug manifests.

The precise technical mechanism is not fully disclosed in publicly available information. The NVD description states that "under certain circumstances, attackers can exploit a flaw in domain name normalization to spoof domains they do not own," but does not provide the exact code path, function name, or the specific transformation that fails. It is reasonable to infer — given the domain of the product and the affected component — that the flaw resides in a utility function responsible for sanitizing or canonicalizing domain strings before they are compared or stored. Without access to the patch diff or vendor advisory details, deeper code-level analysis is not possible.

Insufficient technical detail is available to pinpoint the exact function, file path, or normalization step affected. Analysts should be aware that the lack of available exploit code or PoC suggests either the bug is subtle and not trivially triggerable, or the exploitation conditions require a specific combination of server configuration and remote input that has not yet been systematically weaponized in public channels.

Attack Surface

The primary attack surface is the ActivityPub federation endpoint, which accepts messages from remote Mastodon instances (and other ActivityPub-compatible platforms) over HTTPS. Because Mastodon instances are designed to be open to federation by default, this endpoint is exposed to the public internet on any deployment that has not restricted federation by allowlist. The vulnerability requires no authentication — it is triggered during the normal exchange of federated messages, likely during the processing of incoming activity or during the resolution of remote account/instance identifiers.


Exploitation Scenarios

Given the NVD description's assertion that the flaw enables domain spoofing, and absent any public exploit code or detailed write-up, the following attack chain is inferred from the vulnerability class and the standard operation of Mastodon federation.

No public PoC available; attack chain is inferred from the vulnerability class.

Step 1: Reconnaissance / Target Identification

The attacker identifies a vulnerable Mastodon instance running a version prior to 3.5.14, 4.0.10, 4.1.8, or 4.2.0-rc2. This can be accomplished by probing the instance's public API endpoints, inspecting the software version banner, or querying the /api/v1/instance endpoint (if exposed), which typically reveals version information. Alternatively, the attacker can fingerprint the instance by observing federation behavior or using Shodan-style searching for known Mastodon server headers or page fingerprints.

Step 2: Triggering the Normalization Flaw

The attacker crafts a federated message or a remote identifier that contains a domain name in a non-canonical form designed to bypass the normalization routine. For example, the attacker might submit a WebFinger request, an ActivityPub actor URI, or a follow request that references a domain using a representation that the normalization logic fails to canonicalize correctly. The key is that the malformed domain representation must survive to the comparison/storage stage, where it evades the intended canonical form check.

Step 3: Payload Execution at the Vulnerability-Class Level

At the vulnerability-class level, the malicious domain string functions as the payload. Because the DNS/domain normalization check is bypassed, the attacker can cause the Mastodon server to believe an incoming message or identity originates from a trusted or different domain than it actually does. The practical effect is that the attacker can present themselves as belonging to, or sending messages from, a domain they do not control — for example, impersonating an administrator of a well-known instance or a trusted peer in the federation graph.

Step 4: Post-Exploitation Impact

Once domain spoofing is achieved, the attacker can:

  • Impersonate users — deliver ActivityPub messages that appear to originate from a legitimate account on a trusted instance, potentially misleading victims into phishing, social engineering, or accepting malicious links.
  • Bypass federation controls — if the target instance uses domain-based allowlists or blocklists, the spoofed domain may bypass these restrictions.
  • Poison trust relationships — the attacker's instance could be injected into the target's trusted federation graph, allowing sustained malicious activity.
  • Amplify via onward propagation — federated content is often re-broadcast to connected instances, potentially spreading the spoofed content to a wider network beyond the immediate target.

Impact Assessment

Business Impact

Mastodon is deployed both by individuals and by organizations (companies, public institutions, grassroots communities) that run their own instances. The primary impact of this vulnerability is integrity loss within the federated social graph. A successful exploit erodes trust in the core promise of federation: that messages and identities can be verified as genuinely originating from the domain they claim. For organizations running Mastodon instances, this can manifest as:

  • Reputational damage — if the instance is used to spread spoofed content, the organization's name is associated with the malicious activity.
  • Legal/compliance concerns — for regulated entities, the inability to verify domain identity during inter-enterprise federation could constitute a compliance gap.
  • Operational disruption — incident response, message takedown, and forensic cleanup of spoofed content can be resource-intensive.

Affected Systems

All Mastodon server deployments prior to the patched versions are potentially vulnerable. Because the flaw is in the core federation logic rather than an optional plugin or feature, any instance participating in open federation is exposed by default. The user-facing impact is broader still: end users of Mastodon instances that are victims of domain spoofing may receive misleading content, and users on other instances may be deceived by spoofed identities propagated through the network.

Blast Radius

The CVSS score of 7.4 is evaluated as a high-severity issue. Based on the CVSS vector (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N), the key attributes are:

  • Attack Vector: Network — remotely exploitable over the internet.
  • Attack Complexity: Low — no special conditions or race conditions required to trigger the flaw.
  • Privileges Required: None — no authentication needed to deliver the malicious input.
  • User Interaction: Required — the attack requires a victim to interact with the spoofed content or account (e.g., viewing a post, following an account, or clicking a link).
  • Confidentiality Impact: High — while the primary claimed impact is domain spoofing, the high confidentiality score suggests that spoofed identities could grant unauthorized access to information, such as private messages, restricted posts, or follower lists that should only be visible to trusted accounts.

The effective blast radius is the entire Mastodon-fediverse, since a spoofed message can traverse multiple hops of federation before being delivered to the ultimate victim.


Detection Guidance

Note: Because no public exploit code or specific payload patterns are available, the following detection rules are written to detect anomalous federation and domain-handling behavior that would be consistent with exploitation of a domain normalization flaw. These rules should be tuned to individual environments.

Sigma Rule

title: Suspicious Mastodon Domain Normalization Anomaly
id: 7f3c81a0-8c5a-4e2a-9a3d-f1e2b4c5d6e7
status: experimental
description: Detects anomalous federation requests that may indicate exploitation of CVE-2023-42451 domain normalization flaw
author: Valters IT Security Team
date: 2024/01/01
tags:
    - attack.t1190
    - cve.2023.42451
logsource:
    category: application
    product: mastodon
    service: web
detection:
    selection_webfinger:
        field: http.url
        contains|all:
            - '/.well-known/webfinger'
            - 'resource=acct:'
    selection_odd_domain:
        field: http.request_body
        contains|any:
            - 'resource=acct:*@xn--'
            - 'resource=acct:*@%'
            - 'resource=acct:*@['
    selection_unicode:
        field: http.request_body
        regex: resource=acct:.+@[^\x00-\x7F]+
    condition: selection_webfinger and (selection_odd_domain or selection_unicode)
    timeframe: 5m
level: high
falsepositives:
    - Legitimate WebFinger requests for internationalized domains
    - Federation requests from instances with non-standard DNS configurations

YARA Rule

rule mastodon_domain_normalization_exploit_cve_2023_42451
{
    meta:
        author = "Valters IT Security Team"
        description = "Detects strings and patterns associated with CVE-2023-42451 domain normalization exploitation"
        date = "2024-01-01"
        severity = "high"
        reference = "CVE-2023-42451"
    strings:
        $s1 = "webfinger" ascii wide nocase
        $s2 = "resource=acct:" ascii wide nocase
        $s3 = "actor" ascii wide nocase
        $s4 = "follow" ascii wide nocase
        $s5 = "domain" ascii wide nocase
        $uni1 = /=[A-Za-z0-9._%+-]+@[^\x00-\x7F]+/ ascii wide
        $uni2 = /=[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]*\-{2}/ ascii wide
        $pct = /=[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]*%[0-9A-Fa-f]{2}/ ascii wide
    condition:
        uint16(0) == 0x5A4D or $s1 or $s2 or $s3 or $s4 or $s5
        and ($uni1 or $uni2 or $pct)
}

Suricata IDS Rule

alert http any any -> $HOME_NET any (
    msg:"ET EXPLOIT Mastodon CVE-2023-42451 Domain Normalization Attempt";
    flow:to_server,established;
    content:".well-known"; http_uri;
    content:"webfinger"; http_uri;
    content:"resource"; http_uri;
    content:"acct:"; http_uri;
    pcre:"/resource=acct:[^@]+@[^\x00-\x7f]+/Ui";
    sid:202342451;
    rev:1;
    classtype:attempted-admin;
    reference:cve,2023-42451;
    metadata:created_at 2024_01_01, updated_at 2024_01_01;
)

Elastic Detection

sequence by host.name with maxspan=5m
  [ network where event.action == "connection" and destination.port == 443 and
      process.name == "puma" ]
  [ http where event.action == "request" and
      url.path contains "/.well-known/webfinger" and
      url.query like "*resource=acct:*" and
      ( url.query regex "[^\\x00-\\x7F]" or
        url.query like "*@%*" or
        url.query like "*@xn--*" or
        url.query like "*@[abc]*" )
  ]

Splunk SPL Query

index=web sourcetype=access_combined
| where like(uri_path, "%/.well-known/webfinger%")
| rex field=uri_query "resource=acct:(?<local_part>[^@]+)@(?<domain>.*)"
| where 
    match(domain, "(%[0-9A-Fa-f]{2})") OR
    match(domain, "(xn--)") OR
    match(domain, "[^\\x00-\\x7F]")
| stats count as anomaly_count by src_ip, domain, _time
| where anomaly_count > 5
| sort - _time

Wazuh OSSEC Rule

<group name="mastodon,">
  <rule id="424510" level="12">
    <decoded_as>json</decoded_as>
    <field name="url">\.well-known/webfinger</field>
    <description>Mastodon WebFinger request containing suspicious domain normalization pattern (CVE-2023-42451)</description>
    <regex>resource=acct:[^@]+@[^a-zA-Z0-9.\-]</regex>
    <group>web_application_attack,</group>
    <mitre>
      <id>T1190</id>
    </mitre>
    <var name="rule_timeframe">300</var>
    <var name="rule_frequency">5</var>
    <same_field>srcip</same_field>
    <options>no_full_log</options>
  </rule>
</group>

Mitigation & Patch Guidance

Patch Confidence: 3/4 (LIKELY) — two independent sources (CNA and OSV) confirm the fix.

1) Immediate Mitigations

No official workarounds are published by the vendor. However, until patches can be applied:

  • Restrict federation by allowlist: If the instance's operational model permits, configure Mastodon to only federate with a curated list of trusted domains. This reduces the attack surface by limiting the set of domains that can send normalization-weaponized input.
  • Harden web-facing endpoints: Place a Web Application Firewall (WAF) or reverse proxy in front of the Mastodon instance with rules to block or flag anomalous WebFinger/federation requests containing non-ASCII domain characters, percent-encoded domains, or suspicious punycode patterns (see detection rules above).
  • Monitor federation logs: Actively monitor incoming ActivityPub messages and WebFinger requests for the patterns described in the detection guidance, especially an unusual volume of requests from previously unseen domains.
  • Restrict external access to the server: If the instance is intended for a closed community, restrict network access to the Mastodon server to known administrative ranges, even if this temporarily degrades federation.

2) Patch / Upgrade Steps

The vendor has released fixed versions. Upgrade to the following versions or later:

  • Stable: 3.5.14 (for 3.5.x series)
  • Stable: 4.0.10 (for 4.0.x series)
  • Stable: 4.1.8 (for 4.1.x series)
  • Release Candidate: 4.2.0-rc2 (for 4.2.0 series) — it is recommended to wait for the stable 4.2.0 release if it is imminent, unless the instance requires the RC for other reasons.

Upgrade procedure (standard Mastodon deployment):

  1. Take a full backup of the database and the .env.production configuration file.
  2. Stop the Mastodon services (systemctl stop mastodon-web mastodon-streaming mastodon-sidekiq or equivalent for the deployment method).
  3. Pull the new release from the Mastodon Git repository (git fetch && git checkout v4.1.8 — adjust tag per branch).
  4. Install new Ruby dependencies (bundle install) and Node.js dependencies (yarn install).
  5. Run database migrations (RAILS_ENV=production bundle exec rails db:migrate).
  6. Precompile assets (RAILS_ENV=production bundle exec rails assets:precompile).
  7. Restart services.
  8. Verify instance health via /api/v1/instance (should show the new version) and run a test federation message with a known peer.

3) Long-Term Hardening

  • Establish a patch management cadence: Track Mastodon release notes and treat security releases as high priority. Subscribe to the Mastodon security announcements mailing list if available.
  • Enable automated security scanning: Integrate OSV-Scanner, Trivy, or Grype into CI/CD and production environments to flag vulnerable dependencies.
  • Harden DNS and domain validation: If the organization controls its own DNS, ensure DNSSEC is enabled and validate upstream domain resolution to prevent DNS-level spoofing that could compound federation issues.
  • Regularly audit federation trust graph: Periodically review the list of domains the instance federates with and prune any that appear suspicious or inactive.
  • Maintain an instance allowlist policy: Even for public instances, consider maintaining a default-deny federation policy with explicit allows for known-good instances.

References

  1. NVD Entry — CVE-2023-42451: https://nvd.nist.gov/vuln/detail/CVE-2023-42451
  2. Mastodon Release Notes / Advisory — Information on the patched versions (3.5.14, 4.0.10, 4.1.8, 4.2.0-rc2) is available through the Mastodon project's GitHub releases and security announcements: https://github.com/mastodon/mastodon/releases
  3. OSV Vulnerability Database — Confirmation of the vulnerability and affected package ranges: https://osv.dev/vulnerability/CVE-2023-42451
  4. GitHub Advisory — GitHub Security Advisory database entry for CVE-2023-42451 (if published): https://github.com/advisories
  5. Mastodon Project Site — Official Project Page: https://joinmastodon.org

Threat Actor Campaigns / Exploit-in-the-Wild Evidence: As of this writing, no confirmed in-the-wild exploitation, PoC publication, or threat actor campaign referencing CVE-2023-42451 has been documented in open sources. The CVE is not listed in CISA's Known Exploited Vulnerabilities (KEV) catalog. The EPSS score of 0.00570 places it in the 44.2nd percentile of scored CVEs, indicating a relatively low probability of active exploitation in the near term. However, given the high CVSS score (7.4), the attack vector (network), and the lack of required privileges, this is a vulnerability that should be patched promptly regardless of the lack of observed exploitation.

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

product:Mastodon
http.title:'Mastodon'
http.favicon.hash:-603129940
server:'Mastodon'
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2023-42451/ · 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.