squirrelscan
GitHub

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/users lists the site’s authors, with their slug, which is usually the login name.
  • /?author=1 redirects to /author/<username>/, so counting up the number finds every author.
  • /readme.html is 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.php is a legacy remote API. It is a brute-force target, because system.multicall tries many passwords in one request, and a pingback amplification vector, because pingback.ping makes 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.

PathLevelFinding
/readme.htmlactiveversion disclosure
/xmlrpc.phpactivexmlrpc enabled
/wp-json/wp/v2/usersaggressiveuser enumeration
/?author=1aggressiveuser 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 id and a string slug, or a redirect on the same origin to a path of the form /author/<name>/.
  • Version: a 2xx readme.html whose title is WordPress’s readme title (WordPress › ReadMe), or a 2xx page that mentions WordPress and has a Version line 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 when readme.html is 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.php at the web server unless you need it. In nginx, location = /xmlrpc.php { deny all; }; in Apache, a <Files xmlrpc.php> block with Require all denied. The add_filter( 'xmlrpc_enabled', '__return_false' ); filter is not enough on its own: it turns off only the methods that need a login, so pingback.ping still answers and the endpoint still reports as enabled.
  • Block anonymous access to /wp-json/wp/v2/users (a rest_authentication_errors filter or a security plugin), and block ?author=N redirects at the server or with a plugin.
  • Delete readme.html and license.txt from 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 IDsecurity/wordpress-exposure
CategorySecurity
ScopeSite-wide
Severitywarning
Weight5/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 nameOutcomeClears
wordpress-version-disclosureProblem
wordpress-version-disclosure-closedCleanwordpress-version-disclosure
wordpress-version-disclosure-not-checkedNot checked
wordpress-xmlrpc-enabledProblem
wordpress-xmlrpc-closedCleanwordpress-xmlrpc-enabled
wordpress-xmlrpc-not-checkedNot checked
wordpress-user-enumerationProblem
wordpress-user-enumeration-closedCleanwordpress-user-enumeration
wordpress-user-enumeration-not-checkedNot checked

Type to search…

↑↓ navigate↵ openesc close