Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. studio-42/elfinder
  4. ›
  5. CVE-2026-81891

CVE-2026-81891: elFinder: ZIP extraction bypasses uploadDeny MIME filter allowing PHP file upload (RCE)

September 2, 2026

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.


References

  • github.com/Studio-42/elFinder/commit/191372c1bbebbd36fb55af79a84b9984861390ff
  • github.com/Studio-42/elFinder/commit/dd73e702820c146a192969800ee674ecdb208365
  • github.com/Studio-42/elFinder/releases/tag/2.1.70
  • github.com/Studio-42/elFinder/security/advisories/GHSA-gxmj-r5rf-ggwq
  • github.com/advisories/GHSA-gxmj-r5rf-ggwq
  • nvd.nist.gov/vuln/detail/CVE-2026-81891

Code Behaviors & Features

Detect and mitigate CVE-2026-81891 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.1.70

Fixed versions

  • 2.1.70

Solution

Upgrade to version 2.1.70 or above.

Impact 8.1 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-434: Unrestricted Upload of File with Dangerous Type

Source file

packagist/studio-42/elfinder/CVE-2026-81891.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 05 Sep 2026 12:17:55 +0000.