CVE-2026-81891 — Vulnerability in Studio-42/elFinder — CVE Details
elFinder: ZIP extraction bypasses uploadDeny MIME filter allowing PHP file upload (RCE)
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.90%). Schedule for your next planned update.
Does your project use an affected studio-42/elfinder version?
Paste your composer.lock to check it for CVE-2026-81891 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
elFinder provides uploadDeny and uploadAllow options in its connector configuration to restrict which MIME types may be uploaded. When uploadDeny includes text/x-php, direct upload of .php, .phtml, and .phar files is correctly blocked. However, the extract command (ZIP decompression) internally calls checkExtractItems(), which invokes mimetypeInternalDetect() directly without passing the result through mimeTypeNormalize(). Because phtml, phar, and similar PHP-executable extensions are absent from mime.types, they are not resolved to text/x-php at the detection stage, causing the MIME filter to be silently bypassed. An attacker who is permitted to upload ZIP archives can therefore extract PHP-executable files into the web-accessible files/ directory. If the server is configured to execute the affected extension (e.g., .phtml, .phar) as PHP — which is the case in common Apache and Nginx deployments — this results in Remote Code Execution.
Details
elFinder's MIME validation pipeline for direct uploads (upload command) is:
mimetype()
└─ mimetypeInternalDetect() // stage 1: extension → MIME via mime.types
└─ mimeTypeNormalize() // stage 2: apply staticMimeMap
phtml:* → text/x-php
phar:* → text/x-php
php5:* → text/x-php
└─ allowPutMime() // blocked: text/x-php ∈ uploadDeny
The extract command (checkExtractItems() in elFinderVolumeDriver.class.php, line 7110) uses a shortened pipeline:
// line 7110 — stage 2 (mimeTypeNormalize) is never called
if ($chkMime
&& ($mimeByName = elFinderVolumeDriver::mimetypeInternalDetect($name))
&& !$this->allowPutMime($mimeByName)) {
Because phtml and phar are not present in mime.types, mimetypeInternalDetect() returns a generic type (e.g., application/octet-stream) for these extensions. Without mimeTypeNormalize(), the staticMimeMap entries that would map phtml:* → text/x-php are never applied, so allowPutMime() sees a non-blocked MIME and permits extraction.
Affected extensions confirmed: .phtml, .phar, .php5, .php3
Not bypassed: .php (present in mime.types, detected as text/x-php in stage 1)
PoC
Requirements:
- elFinder 2.1.69 deployed under Apache/Nginx (PHP-FPM or mod_php)
- Connector configured with
uploadDeny = ['text/x-php']anduploadAllowincludingapplication/zip files/directory served under a public web path
Step 1 — Confirm direct upload is blocked
Open elFinder in a browser and click the Upload button.
Select hello.phtml (content: <?php phpinfo(); ?>).
→ Upload is rejected with: "Upload file hello.phtml: File type not allowed (text/x-php)"
Step 2 — Upload a ZIP containing the payload
Create bypass.zip containing hello.phtml.
Upload bypass.zip via the Upload button.
→ ZIP is accepted (MIME: application/zip ∈ uploadAllow).
Step 3 — Extract the ZIP
Right-click bypass.zip in the file list → Extract files.
→ hello.phtml appears in the file list without any error.
→ File is now present at {files_dir}/hello.phtml on the server.
Step 4 — Execute the extracted PHP file
Navigate to:
http://<target>/elFinder/files/hello.phtml
→ Apache processes the file as PHP and renders the full phpinfo() output, confirming Remote Code Execution.
Impact
Any user with ZIP upload permission can bypass the uploadDeny MIME restriction, place PHP-executable files in a web-accessible directory, and achieve Remote Code Execution on the server.
Concrete impact:
- Arbitrary PHP code execution on the web server
- Full server environment disclosure via
phpinfo()(paths, PHP version, loaded modules, environment variables) - Potential access to server filesystem, database credentials, and internal network services
- Complete compromise of the web application if an attacker substitutes
phpinfo()with a web shell (e.g.,<?php system($_GET['cmd']); ?>)
Extensions confirmed executable on Apache (default config): phtml, phar, php5, php3
Recommended fix:
Apply mimeTypeNormalize() inside checkExtractItems() so that the full MIME pipeline is used consistently:
// elFinderVolumeDriver.class.php, line 7110
// Before (vulnerable):
$mimeByName = elFinderVolumeDriver::mimetypeInternalDetect($name)
// After (fixed):
$mimeByName = $this->mimeTypeNormalize(
elFinderVolumeDriver::mimetypeInternalDetect($name),
$name,
pathinfo($name, PATHINFO_EXTENSION)
)
Advisory Timeline
- First published September 2, 2026 (85 days ago).
- Last revised September 2, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "Studio-42/elFinder:^2.1.70"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Packagist (1).
| Package | Fixed In |
|---|---|
| Studio-42/elFinder Packagist · Affected: All versions | 2.1.70 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-434Unrestricted File UploadMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.1 score means for each attack dimension.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/Studio-42/elFinder/security/advisories/GHSA-gxmj-r5rf-ggwqWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-81891ADVISORY
- https://github.com/Studio-42/elFinder/commit/191372c1bbebbd36fb55af79a84b9984861390ffWEB
- https://github.com/Studio-42/elFinder/commit/dd73e702820c146a192969800ee674ecdb208365WEB
- https://github.com/Studio-42/elFinderPACKAGE
- https://github.com/Studio-42/elFinder/releases/tag/2.1.70WEB
Frequently Asked Questions
- What is CVE-2026-81891?
- elFinder: ZIP extraction bypasses uploadDeny MIME filter allowing PHP file upload (RCE). This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.1/10).
- How do I check if my project is affected by CVE-2026-81891?
- CVE-2026-81891 affects Studio-42/elFinder. It has a 0.9% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-81891 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is an above-median EPSS score — 57.8% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2019-9194CRITICAL
elFinder command injection vulnerability in the PHP connector
- CVE-2024-38909HIGH
Studio 42 elFinder vulnerable to Incorrect Access Control
- CVE-2026-103035HIGH
TeamPass folder re-parenting authorization bypass
- CVE-2026-41247HIGH
elFinder: Command injection in resize background color parameter when using ImageMagick CLI
- CVE-2026-81889HIGH
elFinder: SSRF protection bypass via DNS rebinding in the `fsock_get_contents()` fallback
- CVE-2026-44521HIGH
elFinder MySQL has a SQL Injection in its Volume Driver (elFinderVolumeMySQL)
- CVE-2026-110782HIGH
SAML2: Incomplete fix of CVE-2026-49283: unsigned embedded Response bypasses HTTP-Artifact signature verification (no embedded-Issuer binding)