WordPress exposure: user enumeration, version disclosure and xmlrpc.php
An open wp-json users endpoint, an ?author= redirect, readme.html or xmlrpc.php hands attackers usernames, your version and a brute-force target. squirrel checks them on WordPress sites.
What WordPress exposes by default
A stock WordPress install answers a few requests that help an attacker more than they help a visitor:
/wp-json/wp/v2/userslists the site’s authors, with theirslug, which is usually the login name./?author=1redirects to/author/<username>/, so counting up the number finds every author./readme.htmlis WordPress’s own readme. It confirms the site runs WordPress and dates the install, and readme files from old releases name the exact version, so a scanner knows which known vulnerabilities to try./xmlrpc.phpis a legacy remote API. It is a brute-force target, becausesystem.multicalltries many passwords in one request, and a pingback amplification vector, becausepingback.pingmakes your server request a URL the attacker picks.
Usernames are half of every login. Once an attacker has them, they can feed them to wp-login.php or xmlrpc.php in a brute-force or credential-stuffing run.
What squirrel checks
This is a probing rule. It runs only on a website detected as WordPress (the endpoint discovery pass found the WordPress stack), and reports nothing on any other site. It sends requests beyond the crawl, so it follows the probing intensity: on a passive run it sends nothing and records a skipped check for each of the three findings.
What is sent
Only GET requests, one per path, to the audited origin. A run sends at most four requests.
| Path | Level | Finding |
|---|---|---|
/readme.html | active | version disclosure |
/xmlrpc.php | active | xmlrpc enabled |
/wp-json/wp/v2/users | aggressive | user enumeration |
/?author=1 | aggressive | user enumeration |
Username enumeration is a loud probe: it is what a scanner does to build a password list, so it runs only with --probe aggressive, on a site you own or may test. xmlrpc.php is never sent a POST: a GET to an enabled endpoint answers “XML-RPC server accepts POST requests only”, which is enough.
Requests carry no cookies and do not follow redirects. Reads are capped (64 KB for readme.html, 256 KB for the users list). Requests go one at a time, each with a 10 second timeout, inside the shared probe budget, and the whole rule stops after 30 seconds. A 429 answer or a bot or WAF challenge stops the rule. Below aggressive, a path that robots.txt disallows is not requested.
How each exposure is confirmed
A status code alone never counts, so a site that answers every path with a 200 page is not a finding.
- Users: a JSON array whose every entry has a numeric
idand a stringslug, or a redirect on the same origin to a path of the form/author/<name>/. - Version: a 2xx
readme.htmlwhose title is WordPress’s readme title (WordPress › ReadMe), or a 2xx page that mentions WordPress and has aVersionline with a dotted number. Current WordPress releases ship a readme that names no version, and serving it is still the finding: the clean check passes only whenreadme.htmlis not WordPress’s readme. - xmlrpc: the “XML-RPC server accepts POST requests only” answer, on any status other than 404 or a 5xx.
Results
A finding names the endpoint and the kind of evidence. For users it adds the number of users listed. For the version it adds the version number when the readme names one (evidence readme-version); a readme without one is reported with evidence readme-served. A username is never stored or reported, and no response body leaves the rule.
Each of the three families has a problem check, a clean check and a not-checked check, so a pass clears only what the run requested and got a definite answer for. An active run never asks for usernames, so it never clears a user enumeration finding from an earlier aggressive run.
How to fix it
- Deny
/xmlrpc.phpat the web server unless you need it. In nginx,location = /xmlrpc.php { deny all; }; in Apache, a<Files xmlrpc.php>block withRequire all denied. Theadd_filter( 'xmlrpc_enabled', '__return_false' );filter is not enough on its own: it turns off only the methods that need a login, sopingback.pingstill answers and the endpoint still reports as enabled. - Block anonymous access to
/wp-json/wp/v2/users(arest_authentication_errorsfilter or a security plugin), and block?author=Nredirects at the server or with a plugin. - Delete
readme.htmlandlicense.txtfrom the web root (an update puts them back, so delete them after each update, or deny them at the server), and keep WordPress updated. - Use login names that differ from author slugs, and rate limit
wp-login.php.
| Rule ID | security/wordpress-exposure |
| Category | Security |
| Scope | Site-wide |
| Severity | warning |
| Weight | 5/10 |
Enable / disable
Disable this rule
[rules]
disable = ["security/wordpress-exposure"]Disable all Security rules
[rules]
disable = ["security/*"]Enable only this rule
[rules]
enable = ["security/wordpress-exposure"]enable replaces the default ["*"], so this is the only rule selected. Leave disable out: a rule that matches any disable pattern is skipped even when enable names it. Only an enabled setting under a rule’s own [rule_options] table overrides both lists.
Check names by outcome
Each check name this rule can emit, by what it means to a tool comparing two audits. A problem check is a finding. A clean check says the rule ran over what it covers and found nothing; it clears the problem checks listed beside it, so a finding is fixed when the rule ran over the same scope and a clean check took its place. A not checked check says the rule did not evaluate, and never clears a finding.
| Check name | Outcome | Clears |
|---|---|---|
wordpress-version-disclosure | Problem | |
wordpress-version-disclosure-closed | Clean | wordpress-version-disclosure |
wordpress-version-disclosure-not-checked | Not checked | |
wordpress-xmlrpc-enabled | Problem | |
wordpress-xmlrpc-closed | Clean | wordpress-xmlrpc-enabled |
wordpress-xmlrpc-not-checked | Not checked | |
wordpress-user-enumeration | Problem | |
wordpress-user-enumeration-closed | Clean | wordpress-user-enumeration |
wordpress-user-enumeration-not-checked | Not checked |
Related rules
- security/exposed-actuator: the same kind of probe for Spring Boot.
- security/exposed-files: readable .git, .env and backup files.
- security/version-disclosure: response headers that name a server version.