Every CVE Search/ Get API key

CVE-2021-23394

Remote Code Execution (RCE)

8.1 HighPublic exploitFix available

The package studio-42/elfinder before 2.1.58 are vulnerable to Remote Code Execution (RCE) via execution of PHP code in a .phar file. NOTE: This only applies if the server parses .phar files as PHP.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

18.9%Up 16.7 points since Jun 14, 2021
90%50%10%1%

What each source reports

CVE List Score used 8.1

Remote Code Execution (RCE)

The package studio-42/elfinder before 2.1.58 are vulnerable to Remote Code Execution (RCE) via execution of PHP code in a .phar file. NOTE: This only applies if the server parses .phar files as PHP.

Record
CVE-2021-23394
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
EUVDEUVD-2021-1383 8.1

The package studio-42/elfinder before 2.1.58 are vulnerable to Remote Code Execution (RCE) via execution of PHP code in a .phar file. NOTE: This only applies if the server parses .phar files as PHP.

Record
EUVD-2021-1383
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-03
GitHub AdvisoriesGHSA-qm58-cvvm-c5qr 8.1

elFinder unsafe upload filtering leading to remote code execution

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.
Record
GHSA-qm58-cvvm-c5qr
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-434
Updated
2026-11-02
NVD 8.1

The package studio-42/elfinder before 2.1.58 are vulnerable to Remote Code Execution (RCE) via execution of PHP code in a .phar file. NOTE: This only applies if the server parses .phar files as PHP.

Record
CVE-2021-23394
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
6.8 MediumAV:N/AC:M/Au:N/C:P/I:P/A:P
Weakness
CWE-434
Updated
2026-11-02
OSV 9.8

The package studio-42/elfinder before 2.1.58 are vulnerable to Remote Code Execution (RCE) via execution of PHP code in a .phar file. NOTE: This only applies if the server parses .phar files as PHP.

Record
CVE-2021-23394
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVGHSA-qm58-cvvm-c5qr 8.1

elFinder unsafe upload filtering leading to remote code execution

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.
Record
GHSA-qm58-cvvm-c5qr
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-434
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
studio-42/elfinder
Packagist
before 2.1.58
2.1.58
studio-42/elfinder
Packagist
before 2.1.58, plus listed versions
2.0.32.0.42.0.52.0.62.0.7
Show 45 moreShow less
2.0.82.0.92.1.02.1.12.1.102.1.112.1.122.1.132.1.142.1.152.1.162.1.172.1.182.1.192.1.22.1.202.1.212.1.222.1.232.1.242.1.252.1.262.1.272.1.282.1.292.1.32.1.302.1.312.1.322.1.332.1.342.1.352.1.362.1.372.1.382.1.392.1.42.1.402.1.412.1.422.1.432.1.442.1.452.1.462.1.47
2.1.58

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
NucleielFinder < 2.1.58 - Remote Code Execution
PoC in GitHub0xnemian/CVE-2021-233942025-11-30

History

History
RecordedChangedSources
aliases, publishedEUVD
first indexedCVE List, GitHub Advisories, Nuclei, NVD, OSV, PoC in GitHub

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-23394 is a high vulnerability (CVSS 8.1) in Std42 Elfinder, published June 13, 2021. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 18.9%, the 97th percentile. Fixed in studio-42/elfinder 2.1.58.

References

This page doesn't list everything

Left out here: 15 versions. The JSON record has them.

MoveEnter Open