🧠 WordPress - Enumeration

What is it?

  • Concept: Harvesting users, version, plugins/themes, and readable content from a WordPress site β€” most of it pre-auth, via predictable endpoints.
  • Impact: Usernames for password attacks, a version/plugin list for known-CVE matching, and leaked files from the uploads directory.

How it works

  1. WordPress exposes many predictable paths; the REST API and author scans leak usernames; /wp-content/uploads serves media world-readable.
  2. Once you have a login, the capability map tells you what the account can do β€” but verify behaviourally (a 403 on an admin screen is the truth).

Exploitation

Prerequisites

  • HTTP(S) access to the site

Attack Vectors

All-in-one (WPScan)

wpscan --url https://target --disable-tls-checks --enumerate u,vp,vt,ap

User enumeration (REST + author scan)

curl -sk 'https://target/?rest_route=/wp/v2/users' | jq '.[].slug'
for i in $(seq 1 10); do curl -sko /dev/null -w "%{http_code} %{redirect_url}\n" "https://target/?author=$i"; done

Version & plugin/theme fingerprinting

curl -sk https://target/readme.html | grep -i version
curl -sk https://target/wp-content/plugins/<plugin>/readme.txt | head
#   the page HTML also lists active-theme asset paths (/wp-content/themes/<theme>/...)

Anonymous content (uploads)

Media is world-readable and often leaks docs/audio/backups.

curl -sk https://target/wp-content/uploads/2026/01/        # directory listing if enabled

Authenticated capability check

See WordPress for the dual-auth + X-WP-Nonce dance, then:

# with the logged-in cookie + the X-WP-Nonce header:
curl -sk 'https://target/?rest_route=/wp/v2/users/me&context=edit' -H "X-WP-Nonce: <nonce>"

Notes

  • Verify capabilities behaviourally β€” hit /wp-admin/upload.php, theme-editor.php, users.php, etc.; a 403 means you really can’t, regardless of the capability list.
  • A low-privilege contributor still matters if their content renders in an admin screen β†’ stored XSS pivot, see WordPress - XSS to Admin Account Takeover.
  • Don’t crack wp_users hashes ($wp$/$2y$ bcrypt) β€” pull reusable creds from wp-config.php instead.

Mitigation

  • Fix: Block REST/author user enumeration, disable directory listing on uploads, keep plugins/themes patched and minimal.
FileCreated
HTB Machine - MakeSenseSeptember 14, 2026

References: