/

CVE-2026-81889

Severity:

HIGH RISK

(8.6)

Server-Side Request Forgery (CWE-918) in elFinder Uploads

CVE-2026-81889

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Internal Network Access and Data Exposure

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

elFinder contains server-side request forgery weaknesses in its URL upload and header-fetching logic. An attacker who can submit a URL for upload may use DNS rebinding or related request behavior to make the server access internal services and store or expose their responses as uploaded files.

Affected context

The issue occurs in elFinder deployments that enable URL uploads and use the affected PHP request-handling paths. Risk is increased when PHP cURL is unavailable, because the fallback socket implementation validates one DNS result but later connects using a hostname that may resolve differently. A separate header request can also contact the original hostname without reusing a validated connection, creating an additional SSRF path.

Exploit preconditions

  • Attack surface: elFinder's URL upload functionality and related remote header retrieval
  • Required access: Permission or ability to submit a URL upload request, depending on the deployment's access controls
  • Trigger point: Server-side fetching of the attacker-supplied URL
  • Environmental condition: The fallback socket path may be selected when PHP cURL is unavailable; DNS behavior must permit the attacker to influence successive resolutions for the rebinding path
  • Why exploitation is possible: Address validation is not consistently bound to the connection that performs the request, allowing a hostname to resolve to a public address during validation and an internal address during connection

Why this happens

The underlying flaw is incomplete SSRF protection caused by validating an IP address separately from the hostname-based connection that is ultimately made. In the fallback path, the server performs another DNS resolution and connects to the resulting host, so DNS rebinding can invalidate the earlier validation decision. Separately issuing a header request without reusing a validated, pinned connection creates another opportunity to contact attacker-selected or internal destinations. This behavior maps to CWE-918: Server-Side Request Forgery.

Potential impact

  • An attacker could access services bound to loopback or private network addresses
  • Internal HTTP response bodies may be stored as files and exposed through elFinder
  • Sensitive metadata, credentials, or administrative responses could be disclosed
  • The application could make blind requests to internal services
  • Internal systems could be probed or abused through the compromised server's network position

General mitigation guidance

Mitigation generally focuses on making destination validation and network connection establishment part of one controlled operation.

Common defensive patterns include:

  • Resolve destinations once and bind the validated address to the outbound connection
  • Validate both the initial and final destination while rejecting loopback, link-local, private, multicast, and other restricted ranges
  • Avoid following redirects unless each destination is independently validated
  • Reuse the same validated connection for response retrieval and header inspection
  • Prefer allowlisted outbound destinations when URL uploads are required
  • Restrict server egress at the network and runtime layers
  • Limit the elFinder service account's access to sensitive files and internal services
  • Avoid exposing fetched response content through user-readable upload locations

How teams detect issues like this

Detection approaches can include:

  • Static analysis for URL fetches that validate one address but connect using a hostname or perform a later independent request
  • Code review checks for DNS resolution, redirect handling, socket connections, and header retrieval in SSRF-sensitive code
  • Tests that simulate DNS changes between validation and connection establishment
  • Runtime monitoring of outbound requests from elFinder to loopback, private, link-local, and cloud metadata ranges
  • Egress policies and alerts for unexpected internal address access or repeated DNS resolutions for the same user-controlled hostname
  • Automated security review tools that identify unpinned DNS validation and server-side URL retrieval patterns

Sources

SourceLink
github.comgithub.com/Studio-42/elFinder/commit/191372c1bbebbd36fb55af79a84b9984861390ff
github.comgithub.com/Studio-42/elFinder/commit/6d997386cd0f1abab4706c220b46b0aea0ecff51
github.comgithub.com/Studio-42/elFinder/releases/tag/2.1.70
github.comgithub.com/Studio-42/elFinder/security/advisories/GHSA-8x3q-jpjh-qh5c

Frequently asked

questions

Potentially. A remote attacker may exploit it when the elFinder deployment exposes URL uploads and grants the attacker permission to submit a remote URL.

Not necessarily, but the attacker must have whatever access the deployment requires to reach and use the URL upload feature. Misconfigured or publicly accessible instances face greater exposure.

Validate the final destination and use the validated, pinned address for the complete request, including header processing. Restrict outbound destinations and reject private or otherwise sensitive network ranges.

Treat every user-controlled URL as untrusted, test DNS rebinding and redirect behavior, enforce outbound network policies, and monitor application egress for requests to internal services.

Find out what's already
exploitable in your codebase.