WordPress User Enumeration: What It Means and How to Fix It
Your scan found that WordPress is publishing account usernames to anyone who asks. That hands out half of every login for free, leaving only the password to guess. The fix is quick, and knowing a username stops being useful once you pair it with a couple of standard protections.
One free scan, no login. This check runs alongside DNS, email, TLS, headers, exposed files and known CVEs.
What user enumeration actually means
WordPress has a habit of publishing the usernames of its accounts. It does this in two common places. The first is the REST API, specifically the /wp-json/wp/v2/users endpoint, which returns a tidy list of author accounts to anyone who visits it. The second is author archive URLs: a request to /?author=1 quietly redirects to /author/theusername/, revealing the login name in the address bar.
None of this is a break-in. It is public information that WordPress offers on request, which is exactly why the outside view can see it. Your BadgerScan check is passive and read-only. It reads what is publicly visible and never guesses or tests a password.
The concern is simple. A login has two halves, a username and a password. When the username is handed out freely, an attacker only has to work on the password. The WordPress documentation calls out limiting login information as part of basic hardening (WordPress.org, Hardening WordPress).
Why it is worth fixing
A username on its own does no harm, but it changes the math on a login form. Automated password-guessing tools work far more efficiently when they already know a valid account name, because every attempt is aimed at a real target instead of a guess.
Closing this off is low effort and low risk. For most small business sites, nobody needs to read the raw list of accounts from the REST API, and author archive pages are often unused. Tidying both up removes an easy piece of reconnaissance without changing how your site looks to visitors.
How to fix it, step by step
The goal is to stop publishing usernames and to make sure that even a leaked username is not enough to get in. Work through these in order.
- Restrict the REST API users endpoint so it is not public. A reputable security plugin can do this in one setting, or a developer can filter the
rest_endpointsresponse in code to remove the users route. The WordPress REST API Handbook documents how endpoints and their permissions work. - Disable author archives if you do not use them. Many security plugins include a toggle for this, which stops
/?author=1from redirecting to a/author/name/URL that leaks the login. - Turn on two-factor authentication for every account that can log in. This is the single change that makes a known username harmless, because the password alone is no longer enough.
- Add login rate-limiting, either through your security plugin or your host, so repeated password attempts against a known username get slowed down or blocked.
- Make sure your account usernames are not also your public display names, and avoid the default
adminusername. Set a separate display name in each user profile so your byline never reveals the login. - Re-run a free scan to confirm the usernames are no longer publicly visible. You can run the free scan again in under a minute.
One thing to check after you fix it
Restricting the REST API users endpoint is safe for the vast majority of sites, but a small number of plugins or a custom theme genuinely read that endpoint to build author pages or bylines. After you lock it down, click through your site as a normal visitor and confirm nothing looks broken. If an author listing disappears, your plugin has a supported way to expose only the data it needs, rather than reopening the whole endpoint to the public. When in doubt, keep the endpoint closed and let two-factor authentication and rate-limiting carry the weight.
See what your WordPress site is publishing
Run the free BadgerScan scan to check whether your usernames are exposed through the REST API or author URLs, along with the rest of your public security posture. No login, no install, results in about a minute.
Run a free security scanFrequently asked questions
Does hiding usernames alone make my site secure?
No, and that is the point. Restricting the REST API users endpoint and author archives removes an easy piece of reconnaissance, but a username can still surface elsewhere. Always pair it with two-factor authentication and login rate-limiting so that knowing a username is not enough to get in.
Will restricting the REST API break my website?
For most small business sites, no. Regular visitors and most plugins do not need the public /wp-json/wp/v2/users list. After you apply the change, browse your site as a visitor to confirm author pages and bylines still work as expected.
Did BadgerScan guess or test any passwords?
No. The scan is passive and read-only. It only reads information WordPress already publishes to the outside view, such as the REST API users list and author archive URLs. It never attempts a login or guesses a password.
How do I confirm the fix worked?
After applying the changes, run a fresh scan. You can run the free scan again and the user enumeration finding should be gone. It takes under a minute and needs no login.
Sources
More from CyberBadger
BadgerScan is the website side of what we do. We're one local Hamilton and Burlington team for your whole setup, on-site nearby and remote across Canada.
Coming soon: BadgerAudit. A full, on-site cybersecurity audit, interviews, hands-on review, and a detailed report, for when a self-serve scan isn't enough. Ask us about it.