Remote Code Execution (RCE) Affecting studio-42/elfinder package, versions <2.1.63


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.04% (11th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Remote Code Execution (RCE) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-STUDIO42ELFINDER-8320938
  • published1 Nov 2024
  • disclosed31 Oct 2024
  • creditMetin Yunus Kandemir

Introduced: 31 Oct 2024

CVE-2023-52044  (opens in a new tab)
CWE-94  (opens in a new tab)
First added by Snyk

How to fix?

Upgrade studio-42/elfinder to version 2.1.63 or higher.

Overview

studio-42/elfinder is an open-source file manager for web, written in JavaScript using jQuery UI.

Affected versions of this package are vulnerable to Remote Code Execution (RCE) due to the lack of restrictions on file types that can be uploaded, specifically the .php8 extension. An attacker can execute arbitrary code on the server by uploading a malicious .php8 file.

Workaround

This issue can be mitigated by using additionalMimeMap in the roots configuration.

PoC

  1. Select arbitrary png file to upload

  2. Capture request with Burp and set content as test<?php phpinfo();?>

  3. Set filename like test.php8

  4. After forwarding the request, the file is successfully uploaded under the files directory

CVSS Scores

version 4.0
version 3.1