Description
Mastodon is a free, open-source social network server based on ActivityPub. Prior to 4.5.10, 4.4.17, and 4.3.23, when using Ruby versions older than 3.4, PrivateAddressCheck.private_address? returns false for IPv4-mapped IPv6 addresses (::ffff:a.b.c.d) corresponding to some private IPv4 addresses, depending on Ruby version, this can include loopback, RFC1918 private networks, and link-local space. An attacker who controls DNS for any domain can publish an AAAA record with such a mapped address; any outbound HTTP fetch Mastodon performs against that hostname then opens a real TCP connection to the underlying IPv4 address, including 127.0.0.1 and cloud-metadata endpoints such as 169.254.169.254. This vulnerability is fixed in 4.5.10, 4.4.17, and 4.3.23.
Published: 2026-06-24
Score: 8.6 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Mastodon's PrivateAddressCheck fails to treat certain IPv4-mapped IPv6 addresses as private when a Ruby interpreter older than 3.4 is used. An attacker who controls the DNS for a chosen domain can publish an AAAA record pointing to an IPv4-mapped address that resolves to a private IP. When Mastodon performs an outbound HTTP fetch to that domain, it resolves to the mapped IPv4 address and opens a real TCP connection to the underlying IP. This connectivity can reach loopback interfaces, RFC1918 networks, or the host’s cloud-metadata service. The flaw therefore permits server‑side request forgery that can expose sensitive configuration data or provide a foothold for lateral movement within the trusted network.

Affected Systems

The vulnerability affects Mastodon releases earlier than 4.5.10, 4.4.17, and 4.3.23 when the server runs on Ruby 3.3 or earlier. All newer Mastodon major releases and Ruby versions 3.4 and above contain the fix.

Risk and Exploitability

The CVSS base score is 8.6, indicating high severity. No EPSS score is available and the issue is not listed in CISA's KEV catalog, but the probability of exploitation remains significant for Internet-facing Mastodon installations that use the affected Ruby versions. Attackers need control over a domain’s AAAA record and the ability to trigger an outbound HTTP request from the Mastodon server; once those conditions are met, internal resources can be accessed.

Generated by OpenCVE AI on June 24, 2026 at 21:38 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Mastodon to version 4.5.10, 4.4.17, or 4.3.23 or newer so the private‑address check is corrected.
  • If upgrading Mastodon is not immediately possible, upgrade the Ruby runtime to 3.4.0 or later to provide the correct private‑address logic.
  • Implement a firewall rule or network policy that blocks outbound connections from the Mastodon server to loopback, RFC1918, and link‑local IP ranges to prevent the SSRF from reaching internal services.

Generated by OpenCVE AI on June 24, 2026 at 21:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 24 Jun 2026 20:00:00 +0000

Type Values Removed Values Added
Description Mastodon is a free, open-source social network server based on ActivityPub. Prior to 4.5.10, 4.4.17, and 4.3.23, when using Ruby versions older than 3.4, PrivateAddressCheck.private_address? returns false for IPv4-mapped IPv6 addresses (::ffff:a.b.c.d) corresponding to some private IPv4 addresses, depending on Ruby version, this can include loopback, RFC1918 private networks, and link-local space. An attacker who controls DNS for any domain can publish an AAAA record with such a mapped address; any outbound HTTP fetch Mastodon performs against that hostname then opens a real TCP connection to the underlying IPv4 address, including 127.0.0.1 and cloud-metadata endpoints such as 169.254.169.254. This vulnerability is fixed in 4.5.10, 4.4.17, and 4.3.23.
Title Mastodon: SSRF protection bypass on older Ruby versions
Weaknesses CWE-184
CWE-200
CWE-918
References
Metrics cvssV3_1

{'score': 8.6, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-24T19:41:21.150Z

Reserved: 2026-05-19T19:22:45.729Z

Link: CVE-2026-47389

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-24T21:45:15Z

Weaknesses
  • CWE-184

    Incomplete List of Disallowed Inputs

  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

  • CWE-918

    Server-Side Request Forgery (SSRF)