Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-6641 Overview
CVE-2024-6641 affects the WP Hardening – Fix Your WordPress Security plugin developed by Getastra. The vulnerability exists in all versions up to and including 1.2.6. The flaw resides in the Stop User Enumeration feature, which relies on an incorrect regular expression to block enumeration attempts. Unauthenticated attackers can bypass this control and enumerate valid site usernames over the network. The issue is categorized under [CWE-185] Incorrect Regular Expression and [CWE-697] Incorrect Comparison.
Critical Impact
Unauthenticated remote attackers can bypass the plugin's user enumeration protection and disclose valid WordPress usernames, enabling downstream credential attacks.
Affected Products
- Getastra WP Hardening plugin for WordPress, versions 1.0.0 through 1.2.6
- WordPress sites relying on the Stop User Enumeration feature of WP Hardening for protection
- Sites exposing REST API endpoints or author archive URLs without additional enumeration protections
Discovery Timeline
- 2024-09-18 - CVE-2024-6641 published to the National Vulnerability Database (NVD)
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-6641
Vulnerability Analysis
WP Hardening ships a Stop User Enumeration module intended to block common WordPress reconnaissance techniques. These techniques include requests to /?author=N, /wp-json/wp/v2/users, and author archive slugs that reveal login names. The module inspects incoming requests with a regular expression and rejects patterns that match known enumeration paths. Because the regular expression is written incorrectly, request variations that should match escape the filter. Attackers issue crafted requests that reach the underlying WordPress handlers and receive responses containing valid usernames. The vendor patched the flawed pattern in changeset 3151308 of the wp-security-hardening plugin repository.
Root Cause
The root cause is an incorrect regular expression combined with a flawed comparison in the enumeration filter ([CWE-185], [CWE-697]). The pattern fails to account for URL encoding, alternate parameter placement, and REST API paths that also expose user data. Requests that do not match the narrow pattern bypass the security check entirely.
Attack Vector
The attack is remote and requires no authentication or user interaction. An attacker sends HTTP requests that request author information but do not match the plugin's incorrect regex. WordPress returns responses containing usernames extracted from author archives, redirects, or REST API JSON payloads. Attackers use the harvested usernames as inputs for password spraying, credential stuffing, or targeted brute-force attacks against wp-login.php and XML-RPC.
The vulnerability manifests in the enumeration filter's regular expression logic. See the Wordfence Vulnerability Intelligence entry and the WordPress Security Hardening Update changeset for technical details.
Detect Identity Attacks the Moment Authentication Fails
Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.
Stop Identity AttacksDetection Methods for CVE-2024-6641
Indicators of Compromise
- Unauthenticated requests to /?author=1, /?author=2, and sequential author IDs from a single source IP
- Requests to /wp-json/wp/v2/users or /wp-json/wp/v2/users/1 returning HTTP 200 with JSON containing slug or name fields
- HTTP 301 or 302 redirects from author queries that reveal usernames in the Location header
- Bursts of failed login attempts on wp-login.php shortly after enumeration probes
Detection Strategies
- Inspect web server access logs for repeated author= query strings and REST user endpoint requests from the same client
- Correlate enumeration traffic with subsequent authentication failures to identify staged attacks
- Deploy web application firewall (WAF) rules that flag requests to WordPress user enumeration endpoints regardless of plugin filtering
- Verify the installed WP Hardening plugin version against version 1.2.7 or later
Monitoring Recommendations
- Alert on any REST API access to /wp-json/wp/v2/users from unauthenticated sessions
- Track outbound response sizes on author archive URLs for anomalous JSON payloads
- Monitor for scanner user agents such as wpscan, nuclei, and generic Python HTTP clients targeting WordPress endpoints
- Review WordPress user session logs for logins immediately following enumeration activity
How to Mitigate CVE-2024-6641
Immediate Actions Required
- Update the WP Hardening plugin to a version above 1.2.6 that contains the fixed regular expression from changeset 3151308
- Disable the WP Hardening plugin if a patched version is not yet deployed in your environment
- Restrict access to /wp-json/wp/v2/users at the web server or WAF layer for unauthenticated requests
- Review WordPress accounts for weak passwords and enforce multi-factor authentication on administrative users
Patch Information
The vendor addressed the flaw in the wp-security-hardening repository via changeset 3151308. Administrators should upgrade through the WordPress plugin dashboard or by replacing the plugin directory with the fixed release. Confirm the plugin version in wp-content/plugins/wp-security-hardening/wp-security-hardening.php after upgrading.
Workarounds
- Block ?author= query parameters at the reverse proxy or WAF layer using explicit deny rules
- Return HTTP 403 for unauthenticated requests to /wp-json/wp/v2/users via functions.php or a mu-plugin
- Rename or disable REST API user endpoints using a dedicated REST API hardening plugin
- Enable rate limiting on WordPress login and REST endpoints to slow credential attacks that follow enumeration
# Example Nginx configuration to block WordPress user enumeration
if ($args ~* "author=\d+") { return 403; }
location ~* ^/wp-json/wp/v2/users { deny all; }
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

