CVE-2026-22245
Unknown Unknown - Not Provided
Server-Side Request Forgery in Mastodon Allows Local Network Access

Publication date: 2026-01-08

Last updated on: 2026-01-08

Assigner: GitHub, Inc.

Description
Mastodon is a free, open-source social network server based on ActivityPub. By nature, Mastodon performs a lot of outbound requests to user-provided domains. Mastodon, however, has some protection mechanism to disallow requests to local IP addresses (unless specified in `ALLOWED_PRIVATE_ADDRESSES`) to avoid the "confused deputy" problem. The list of disallowed IP address ranges was lacking some IP address ranges that can be used to reach local IP addresses. An attacker can use an IP address in the affected ranges to make Mastodon perform HTTP requests against loopback or local network hosts, potentially allowing access to otherwise private resources and services. This is fixed in Mastodon v4.5.4, v4.4.11, v4.3.17 and v4.2.29.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-01-08
Last Modified
2026-01-08
Generated
2026-05-07
AI Q&A
2026-01-08
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 5 associated CPEs
Vendor Product Version / Range
mastodon mastodon 4.2.29
mastodon mastodon 4.3.17
mastodon mastodon 4.4.11
mastodon mastodon 4.5.4
mastodon mastodon to 4.2.29 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-918 The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a Server-Side Request Forgery (SSRF) protection bypass in Mastodon. Mastodon makes outbound HTTP requests to user-supplied domains but tries to block requests to local IP addresses to prevent unauthorized access to internal resources (the "confused deputy" problem). However, the blacklist of disallowed IP address ranges was incomplete, missing some IP ranges that could be used to reach local or loopback addresses. An attacker can exploit this by crafting requests using these overlooked IP ranges, causing Mastodon to make HTTP requests to internal or private network hosts that should not be accessible externally. [2]


How can this vulnerability impact me? :

This vulnerability can allow an attacker to make Mastodon perform HTTP requests to internal or local network hosts that are normally inaccessible from outside. This could lead to unauthorized access to private resources and services within the local network or loopback interface, potentially exposing sensitive information or enabling further attacks within the internal network. [2]


How can this vulnerability be detected on my network or system? Can you suggest some commands?

You can detect this vulnerability by checking if your Mastodon instance is performing HTTP requests to local or private IP addresses that should be blocked. Since the vulnerability involves bypassing the private IP address checks, you can monitor outbound HTTP requests from Mastodon to see if any requests target private, loopback, or special-use IP ranges. Additionally, reviewing the Mastodon logs for unusual outbound requests to IPs in the ranges such as 0.0.0.0/8, 100.64.0.0/10, 172.16.0.0/12, and IPv6 equivalents can help detect exploitation attempts. There are no specific commands provided in the resources, but you can use network monitoring tools like tcpdump or Wireshark to capture outbound traffic from the Mastodon server and filter for private IP ranges. For example, a tcpdump command to capture outbound traffic to private IP ranges might be: tcpdump -i <interface> dst net 172.16.0.0/12 or dst net 192.168.0.0/16 or dst net 10.0.0.0/8. Also, reviewing the Mastodon code or configuration to verify if it includes the updated private address checks as per the patches can help confirm if the vulnerability is mitigated. [1, 3, 4]


What immediate steps should I take to mitigate this vulnerability?

The immediate mitigation step is to upgrade your Mastodon instance to one of the patched versions that fix this vulnerability: v4.5.4, v4.4.11, v4.3.17, or v4.2.29. These versions include enhanced private IP address detection that blocks requests to previously overlooked IP ranges. If upgrading immediately is not possible, you should review and tighten the configuration of the `ALLOWED_PRIVATE_ADDRESSES` setting to restrict any unintended private IP address access. Additionally, monitoring and blocking outbound HTTP requests to local or private IP addresses at the network firewall level can help mitigate exploitation attempts until the patch is applied. [2]


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart