CVE-2021-43421: elFinder Unrestricted File Upload vulnerability

studio-42/elfinder Updated 02 Oct 2025

Summary

08/04/2022
Yes i
Critical
9.8

CVE-2021-43421: elFinder Unrestricted File Upload vulnerability. Affects studio-42/elfinder versions >= 2.0.4, < 2.1.60. Fixed in 2.1.60. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

elFinder is an open-source file manager for web applications. It provides a user-friendly interface for managing files and folders on a server. The vulnerability affects versions 2.0.4 to 2.1.59 of the Studio-42 elFinder package. This package is commonly used in PHP-based web applications to enable file management functionality. The vulnerability allows a remote malicious user to upload arbitrary files and execute PHP code through the connector.minimal.php file.

Vulnerability Detail

The vulnerability arises due to insufficient input validation in the connector.minimal.php file. An attacker can exploit this by sending a specially crafted request to the vulnerable server, allowing them to upload malicious files and potentially execute arbitrary PHP code. This can lead to various security risks, including remote code execution, unauthorized access to sensitive data, and server compromise.

How To Fix

Minimum fixed version

2.1.60

This is the first release that contains the fix.

composer require studio-42/elfinder:2.1.60

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, developers can disable or restrict access to the connector.minimal.php file in their web application. This can be achieved by modifying the server configuration or implementing access control measures. However, this workaround may impact the functionality of the file manager component, so upgrading to the patched version is the recommended long-term solution.

Conclusion

The elFinder Unrestricted File Upload vulnerability in the Studio-42 elFinder package can allow remote attackers to upload arbitrary files and execute PHP code. It is crucial for developers to upgrade to the patched version and implement proper input validation to mitigate the risk. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for studio-42/elfinder →

Share this vulnerability

FAQ

elFinder is an open-source file manager for web applications, providing a user-friendly interface for managing files and folders on a server.

Versions 2.0.4 to 2.1.59 of the Studio-42 elFinder package are affected by this vulnerability.

The vulnerability allows a remote attacker to upload arbitrary files and potentially execute PHP code on the vulnerable server. This can lead to various security risks, including remote code execution, unauthorized access to sensitive data, and server compromise.

To fix this vulnerability, it is recommended to upgrade the Studio-42 elFinder package to version 2.1.60 or later. Additionally, developers should ensure proper input validation and sanitization when handling file uploads.

As a temporary workaround, developers can disable or restrict access to the connector.minimal.php file in their web application. However, upgrading to the patched version is the recommended long-term solution.

Related vulnerabilities

Recent vulnerabilities recorded for studio-42/elfinder.

How To Fix

Minimum fixed version

2.1.60

This is the first release that contains the fix.

composer require studio-42/elfinder:2.1.60

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback