Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐘
🐘 Packagist
Not in CISA KEV
HIGH severity

GHSA-qm58-cvvm-c5qr

HIGHFix: Studio-42/elFinder@75ea92d

GHSA-qm58-cvvm-c5qr is a high-severity (CVSS 8.1) Unrestricted File Upload vulnerability in studio-42/elfinder. 2 public exploit references exist, so weaponization risk is real. O3 Security confirms whether GHSA-qm58-cvvm-c5qr is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

elFinder unsafe upload filtering leading to remote code execution

Also known asCVE-2021-23394SNYK-PHP-STUDIO42ELFINDER-1290554
Published
Jun 15, 2021
Updated
Jul 8, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
2 known
Exploitation data as of Jul 8, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected
🐘studio-42/elfinder

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

Impact

Before elFinder 2.1.58, the upload filter did not disallow the upload of .phar files. As several Linux distributions are now shipping Apache configured in a way it will process these files as PHP scripts, attackers could gain arbitrary code execution on the server hosting the PHP connector (even in minimal configuration).

Patches

The issue has been addressed with https://github.com/Studio-42/elFinder/commit/75ea92decc16a5daf7f618f85dc621d1b534b5e1, associating .phar files to the right MIME type. Unless explicitly allowed in the configuration, such files cannot be uploaded anymore. This patch is part of the last release of elFinder, 2.1.58.

Workarounds

If you can't update to 2.1.58, make sure your connector is not exposed without authentication.

Important tips

Server-side scripts can often be created as text files. Currently, elFinder has an appropriate MIME type set for file extensions that are generally runnable on a web server.

However, the server has various settings. In some cases, the executable file may be judged as "text/plain". Therefore, elFinder installers should understand the extensions that can be executed on the web server where elFinder is installed, and check if there are any missing items in the elFinder settings.

The elFinder PHP connector has an option "additionalMimeMap" that specifies the MIME type for each extension. See #3295(comment) for more information.

References

For more information

If you have any questions or comments about this advisory, you can contact:

  • The original reporters, by sending an email to support [at] snyk.io or vulnerability.research [at] sonarsource.com;
  • The maintainers, by opening an issue on this repository.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagiststudio-42/elfinderall versions2.1.58
Exploits & PoCs
2

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for studio-42/elfinder. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update studio-42/elfinder to 2.1.58 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-qm58-cvvm-c5qr is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-qm58-cvvm-c5qr is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-qm58-cvvm-c5qr. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Impact Before elFinder 2.1.58, the upload filter did not disallow the upload of `.phar` files. As several Linux distributions are now shipping Apache configured in a way it will process these files as PHP scripts, attackers could gain arbitrary code execution on the server hosting the PHP connector (even in minimal configuration). ### Patches The issue has been addressed with https://github.com/Studio-42/elFinder/commit/75ea92decc16a5daf7f618f85dc621d1b534b5e1, associating `.phar` files to the right MIME type. Unless explicitly allowed in the configuration, such files cannot be uploaded
O3 Security · Impact-Aware SCA

Is GHSA-qm58-cvvm-c5qr in your dependencies?

O3 detects GHSA-qm58-cvvm-c5qr across Packagist dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.

GHSA-qm58-cvvm-c5qr: studio-42/elfinder… | O3 Security