Executive brief
elFinder is a popular file manager library used in web applications. The vulnerability allows users who can upload ZIP files to extract PHP executable files that bypass the administrator's upload restrictions, leading to remote code execution. An attacker could place a malicious PHP script in a ZIP archive, upload it, extract it, and then execute it to completely compromise the web server and underlying application.
Technical details
The vulnerability is a filter bypass in the ZIP extraction command (CWE-434: Unrestricted Upload of File with Dangerous Type). The root cause is inconsistent MIME validation logic: the direct file upload path calls mimetypeInternalDetect() → mimeTypeNormalize() → allowPutMime(), but the extract command (checkExtractItems() at line 7110 of elFinderVolumeDriver.class.php) calls only mimetypeInternalDetect() → allowPutMime(), skipping the normalization stage. Because .phtml, .phar, .php5, and .php3 are absent from the system mime.types database, they return generic types (e.g., application/octet-stream) instead of text/x-php. Without mimeTypeNormalize(), the staticMimeMap that maps these extensions to text/x-php is never applied. An authenticated attacker can create a ZIP containing a PHP payload file with one of these extensions, upload it (bypassing ZIP validation), and extract it, placing executable PHP in a web-accessible directory. On default Apache/Nginx setups, the extracted file is then executable. The fix (confirmed in 2.1.70) applies mimeTypeNormalize() within checkExtractItems() to enforce consistent validation.
Affected products
- Studio-42 elFinder < 2.1.70
Timeline
- 2026-08-03: disclosed: vulnerability reported to GitHub Advisory Database
- 2026-09-02: advisory: GHSA-gxmj-r5rf-ggwq published; CVE-2026-81891 assigned
- 2026-09-02: patched: patch released in elFinder 2.1.70
- 2026-08-31: other: NVD published CVE-2026-81891 details