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


0.0
critical

Snyk CVSS

    Attack Complexity Low
    Confidentiality High
    Integrity High
    Availability High

    Threat Intelligence

    Exploit Maturity Proof of concept
    EPSS 1.36% (87th percentile)
Expand this section
NVD
9.8 critical

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 ID SNYK-PHP-STUDIO42ELFINDER-2615248
  • published 12 Apr 2022
  • disclosed 12 Apr 2022
  • credit Bingoyyj

How to fix?

Upgrade studio-42/elfinder to version 2.1.61 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) by bypassing the filename restrictions and uploading a PHP file with a preceding a. NOTE: This is exploitable only when elFinder is deployed on a Windows Server.

PoC

  1. Upload a PHP file the contains a payload with a preceding a, i.e: a<?php <payload>?>.
  2. Add two dots after the file name: shell.php...
  3. The shell file is successfully uploaded by bypassing detection and can be accessed via files/shell.php.