WordPress attacks
TL;DR: Core is hardened; the plugin and theme ecosystem is not. wpscan + user enumeration + plugin/theme CVEs + xmlrpc abuse + weak admin creds covers most real-world compromise.
What it is
WordPress runs ~40% of the web. Core auth and security have improved over years, but the average install ships dozens of third-party plugins and a theme, any of which can introduce SQLi, auth bypass, file upload, or SSRF. Most live compromises trace to one of: outdated plugin, weak admin password, xmlrpc.php abuse, or compromised admin credential reuse.
Preconditions / where it applies
- A WordPress site — fingerprint via
/wp-login.php,/wp-content/,Generatormeta,/readme.html,/wp-json/wp/v2/. - For the lowest-effort path: anonymous access to
/wp-json/wp/v2/users(user enumeration) and/wp-login.phpor/xmlrpc.php(brute-force). - For plugin CVE chains: knowing the installed plugins and their versions.
Technique
- Enumerate.
wpscan --url https://target/ --enumerate u,vp,vt,cb— users, vulnerable plugins, themes, config backups. - User enumeration.
/?author=1,/?author=2, … redirects to/author/<login>/./wp-json/wp/v2/usersreturns the list as JSON (when REST API is open).- Login error oracle: “invalid username” vs “invalid password” (default behaviour).
- Brute-force.
/wp-login.php— slow, captcha-able.wpscan --passwords list.txt --usernames admin./xmlrpc.phpsystem.multicall— pack hundreds ofwp.getUsersBlogsauth attempts per request, bypasses naive per-request rate-limiting.
- Plugin / theme CVE. Check wpscan DB / wpvulndb / patchstack. Common patterns:
- File-upload bypass — author/contributor user can upload PHP via plugin that uses
wp_handle_uploadwithout mime check. - Authenticated SQLi —
?action=...AJAX endpoints withesc_sqlmissing. - Unauth file read — option export plugins, backup plugins.
- File-upload bypass — author/contributor user can upload PHP via plugin that uses
- Admin → RCE. Once admin: edit
wp-content/themes/<active>/404.phpvia Appearance → Theme File Editor, drop a webshell. Or install a malicious plugin (Upload Pluginaccepts a zip). If the editor is disabled (DISALLOW_FILE_EDIT), use a plugin upload or the media library + a path-traversal/LFI chain. - xmlrpc DDoS / SSRF (pingback).
pingback.pingwith<value><string>http://internal/</string></value>causes the site to request a URL — internal scanning oracle, DoS amplifier. -
wp-config.php disclosure. Backup files (
wp-config.php.bak,~, swap), exposed.git, or LFI chains read the DB creds, AUTH_KEYs, and secrets.1 2 3
wpscan --url https://target --api-token <key> \ --enumerate u,vp,vt,ap,at,cb,dbe \ --plugins-detection aggressive
Detection and defence
- Auto-update minor versions; patch plugins within 24-48h of advisory. Remove unused plugins/themes.
- Disable XML-RPC (
disable-xml-rpcplugin, or.htaccessdeny) unless you actually need pingback. Require 2FA for all admins. - Lock
/wp-admin/and/wp-login.phpbehind IP allowlist or HTTP basic; setDISALLOW_FILE_EDIT = trueinwp-config.php. - File-integrity monitoring on
wp-content/; periodic comparison to known-good hashes. - Detection: login bursts on
/wp-login.phpand/xmlrpc.php, new PHP files underuploads/, RESTusersenumeration hits.
References
- WPScan vulnerability database — canonical plugin/theme CVE feed.
- Patchstack — WordPress security — additional advisory tracker.
- HackTricks — WordPress pentesting — enumeration commands.