/

CVE-2025-46651

Severity:

CRITICAL RISK

(9.1)

SSRF in Tiny File Manager URL Upload Feature

CVE-2025-46651

Awaiting Analysis

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Unauthorized access to internal services and network reconnaissance via SSRF

Severity:

CRITICAL RISK

(9.1)

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

Tiny File Manager through version 2.6 contains a server-side request forgery (SSRF) vulnerability in its URL-based upload feature, caused by inadequate validation of user-supplied URLs.

By crafting domains that resolve to localhost or internal addresses (for example, www.127.0.0.1.example.com), an attacker can coerce the server into making arbitrary HTTP requests to internal services, enabling unauthorized port scanning or access to internal-only endpoints.

Affected context

This vulnerability occurs in deployments of Tiny File Manager (through 2.6) where the URL upload feature is exposed to users and the application server has network connectivity to internal or localhost-only services.

The issue is particularly relevant when:

  • The Tiny File Manager instance can resolve attacker-controlled domains.
  • The server can reach 127.0.0.1 or internal network ranges from its network context.
  • There are internal HTTP services, admin panels, or metadata endpoints that assume they are unreachable from the public internet.

In such environments, the file manager effectively becomes a proxy that attackers can misuse to interact with otherwise non-public services.

Exploit preconditions

  • Attack surface: HTTP endpoint backing the URL upload feature in Tiny File Manager.
  • Required access: Ability to interact with the Tiny File Manager interface or its URL upload API (often unauthenticated or low-privilege authenticated access).
  • Trigger point: Submission of a crafted URL parameter that appears external but resolves to an internal or localhost address (e.g., hostnames embedding 127.0.0.1).
  • Why exploitation is possible: URL validation focuses on superficial patterns (such as protocol or hostname format) rather than enforcing strict allowlists or robust IP resolution checks. The server trusts DNS resolution and follows the URL, allowing requests to internal IPs or localhost from the server's own network context.

Why this happens

The root cause maps to CWE-918: Server-Side Request Forgery (SSRF), where an application accepts a user-supplied URL and causes the server to initiate outbound requests without adequate validation or restriction.

In this case, Tiny File Manager's URL upload feature treats user-provided URLs as trusted destinations and relies on naive checks (if any) that do not account for hostname tricks, internal IP ranges, or localhost references.

Because the server performs the HTTP request from its own network location, attackers can leverage this behavior to interact with internal endpoints that would otherwise be unreachable from the public internet.

The insecure pattern is the absence of robust network egress controls and URL sanitization/normalization, combined with unguarded server-side HTTP client usage.

Potential impact

  • Unauthorized port scanning of localhost or internal network services from the server's perspective.
  • Access to internal-only HTTP endpoints, such as admin interfaces, monitoring dashboards, or internal APIs.
  • Possible interaction with cloud or container metadata services, potentially exposing credentials or configuration secrets.
  • Bypassing IP-based access controls that assume only local or internal traffic can reach certain services.
  • Using the server as a pivot point for further attacks within the internal network, depending on what internal services expose.

General mitigation guidance

Effective mitigation focuses on strictly limiting where server-side HTTP requests may go and reducing trust in user-supplied URLs:

  • Enforce explicit allowlists of domains or hostnames that the URL upload feature is permitted to access, instead of allowing arbitrary destinations.
  • Normalize and resolve hostnames to their final IP addresses before making a request, and block private, loopback, link-local, and other non-routable address ranges.
  • Restrict the HTTP client to only use a dedicated egress network path that cannot reach sensitive internal services or metadata endpoints.
  • Consider disabling or heavily gating URL-based upload functionality in deployments where it is not strictly necessary.
  • Apply least-privilege principles at the network level, such as firewall rules or security groups, to segment the application server from sensitive internal resources.

How teams detect issues like this

Detection typically combines code-level review with runtime monitoring:

  • Static analysis and code review: Search for server-side HTTP client usage (e.g., curl, file_get_contents, or HTTP libraries) where request destinations are influenced by user input, especially around file upload or import features.
  • Configuration and policy checks: Enforce policies that prohibit outbound requests to private or loopback IP ranges unless explicitly justified, and review any exceptions.
  • Logging and monitoring: Instrument URL upload endpoints to log requested destinations (sanitized where appropriate), and alert on requests targeting 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, or unusual internal hostnames.
  • Network monitoring: Use egress firewalls, web proxies, or IDS/IPS tools to detect and block suspicious outbound HTTP traffic originating from the file manager host.

Sources

SourceLink
github.comgithub.com/RobertoLuzanilla/tinyfilemanager-security-advisories/blob/main/CVE-2025-46651.md
github.comgithub.com/prasathmani/tinyfilemanager/blob/master/tinyfilemanager.php#L608

Frequently asked

questions

Yes. If Tiny File Manager's URL upload feature is exposed over the network, a remote attacker who can reach the interface can typically exploit the SSRF by submitting crafted URLs, without needing local access to the server.

The attacker generally needs the same level of access required to use the URL upload feature, which may be available to unauthenticated users or low-privilege authenticated users depending on configuration. No shell or file system access on the server is required.

The most robust fix is to strictly control outbound destinations: implement a domain/IP allowlist for URL uploads, block all private and loopback IP ranges, and ensure that server-side HTTP clients cannot reach sensitive internal or metadata endpoints. Where possible, disable URL-based fetching entirely or confine it to a tightly controlled set of trusted locations.

To prevent future SSRF vulnerabilities, treat any user-influenced URLs as untrusted, apply strong validation and normalization, and enforce network-layer controls that restrict where application servers can connect. Incorporate SSRF-focused checks into code review, threat modeling, and automated security testing to catch unsafe network access patterns early in development.

Find out what's already
exploitable in your codebase.