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


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
1.08% (85th 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-2615248
  • published12 Apr 2022
  • disclosed12 Apr 2022
  • creditBingoyyj

Introduced: 12 Apr 2022

CVE-2022-27115  (opens in a new tab)
CWE-94  (opens in a new tab)

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.

CVSS Scores

version 3.1