/

CVE-2026-50131

Severity:

HIGH RISK

(8.6)

SSRF via Incomplete IPv4 URL Validation in Fedify

CVE-2026-50131

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918, CWE-1286, CWE-1389

Impact:

Network Pivoting and Internal Service Access via SSRF

Severity:

HIGH RISK

(8.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Fedify's URL validation logic for outbound fetches incompletely distinguishes public from non-public IPv4 addresses, leaving several special-use ranges treated as if they were safe public destinations.

When a Fedify-based ActivityPub server relies on this check to prevent SSRF, an attacker can craft URLs to these misclassified ranges and potentially reach internal or sensitive network resources through the server.

Affected context

This vulnerability affects Fedify-based federated server applications that:

  • Use Fedify's runtime document or media fetching features, and
  • Rely on validatePublicUrl() / isValidPublicIPv4Address() as their primary SSRF safeguard.

The issue is specific to IPv4 address handling, where some non-public special-use, reserved, multicast, benchmarking, or carrier-grade NAT ranges are incorrectly treated as valid public destinations.

Actual risk depends on what services are reachable at those ranges from the Fedify host environment and whether they expose sensitive functionality or metadata.

Exploit preconditions

  • Attack surface: HTTP or protocol endpoints where a remote client can supply or influence a URL that Fedify later fetches (e.g., ActivityPub objects, media URLs, or linked resources).
  • Required access: Ability to interact with the Fedify-based application as a remote client (typically unauthenticated or low-privilege ActivityPub peers or users).
  • Trigger point: The server calling outbound fetch routines that rely on validatePublicUrl() to approve a URL containing an IPv4 address in a misclassified range.
  • Why exploitation is possible: The IPv4 validation logic only blocks common private/local ranges and loopback, but fails to recognize several other non-public or sensitive IPv4 ranges, allowing attacker-controlled URLs to be treated as "public" and fetched by the server.

Why this happens

The root cause is an incomplete network address validation implementation used as a defense against SSRF.

The validatePublicUrl() helper delegates to isValidPublicIPv4Address(), which explicitly rejects some RFC1918 and local ranges but does not account for other special-use, reserved, multicast, carrier-grade NAT, and related IPv4 blocks that are not true public addresses.

This maps primarily to CWE-918 (Server-Side Request Forgery), with aspects of CWE-1286 (Improper Validation of Syntactic Correctness of Input) and CWE-1389 (Improper Validation of Specified IP Address), since the code assumes that any IPv4 address outside a small blocked list is safe to contact, rather than enforcing a comprehensive allowlist or robust classification logic.

Potential impact

  • Fedify servers may fetch resources from otherwise restricted or sensitive network ranges reachable from the host.
  • Attackers could use the server as a proxy to scan internal or adjacent networks, inferring service presence and behavior.
  • Access to metadata or status endpoints (e.g., cloud instance metadata) could lead to credential exposure or environment leakage.
  • Interaction with misconfigured internal services might allow data exfiltration, state changes, or lateral movement in the hosting environment.

General mitigation guidance

Mitigation generally focuses on strengthening SSRF defenses and minimizing trust in user-supplied URLs:

  • Replace bespoke IP range checks with well-maintained libraries or utilities that accurately classify public versus non-public IP ranges across IPv4 and IPv6, including all special-use and reserved blocks.
  • Favor an allowlist model for outbound destinations: explicitly permit only known hostnames, domains, or IP ranges required by the application, and block all others by default.
  • Enforce DNS and IP validation together: resolve hostnames and verify that all resolved addresses fall within approved public ranges before making outbound requests.
  • Run outbound HTTP clients behind a network-level egress filter, proxy, or firewall that blocks access to internal, link-local, and metadata services regardless of application logic.
  • Apply least-privilege principles for the Fedify process, limiting what internal networks and services are reachable from that runtime environment.

How teams detect issues like this

Detection efforts can combine code-level and environment-level checks:

  • Static analysis and code review: Search for custom IP classification utilities and URL validation helpers used as SSRF defenses; verify that they comprehensively handle private, link-local, multicast, reserved, and carrier-grade NAT ranges.
  • Configuration review: Inspect Fedify-based applications for reliance on validatePublicUrl() without additional network controls, and verify whether allowlists, proxies, or egress firewalls are in place.
  • Runtime monitoring: Log outbound HTTP(S) requests from Fedify services and alert on traffic to non-routable, special-use, or unexpected address ranges.
  • Security testing: Use controlled SSRF testing techniques to probe whether user-supplied URLs can trigger requests to internal endpoints (e.g., metadata services or internal APIs), while respecting legal and organizational boundaries.

Sources

SourceLink
github.comgithub.com/fedify-dev/fedify/security/advisories/GHSA-xw9q-2mv6-9fr8

Frequently asked

questions

Exploitability depends on whether external users can influence URLs that Fedify fetches and whether internal or special-use addresses reachable from the server expose meaningful functionality, but in many ActivityPub setups this input is at least partially user-controllable.

Not necessarily. If public or low-privilege interactions with the Fedify-based server allow submission of URLs that trigger outbound fetches, an unauthenticated remote actor may be able to exploit the issue.

The most robust pattern is to avoid relying on ad-hoc IP range checks and instead combine a well-tested IP classification approach with an allowlist of permitted outbound destinations, backed by network-level egress controls.

Treat all user-supplied URLs as untrusted; enforce strict destination allowlists, use proven libraries for IP and hostname validation, accompany application checks with network-layer restrictions, and include SSRF-focused reviews and tests in your regular security assurance process.

Find out what's already
exploitable in your codebase.