wpscan --url target.com --api-token $WPSCAN_API_TOKEN
The Illusion of the Default Scan
When you run WPScan without an API token, you are essentially performing a glorified version check. The scanner looks at the readme.txt of an installed plugin, reads "Version 1.2," checks its internal list of the latest versions, and flags it if the current version is 1.4.
This is passive mapping. It tells you a developer is lazy, but it doesn't give you the ammunition needed to establish a reverse shell.
Without the API, WPScan cannot tell you why version 1.2 is dangerous. Was it patched for a minor cosmetic bug, or was it patched because it allowed unauthenticated Remote Code Execution (RCE)? As a tactical auditor, your time is your most valuable asset. You cannot afford to spend hours manually searching Google to figure out if an outdated slider plugin is actually exploitable.
Enter WPVulnDB: Activating the Intelligence Feed
The true power of WPScan lies in its integration with the WordPress Vulnerability Database (formerly WPVulnDB, now officially the WPScan API). Maintained by security researchers, this database maps specific plugin and theme versions directly to their Common Vulnerabilities and Exposures (CVE) numbers and, crucially, links directly to Proof of Concept (PoC) exploit code.
By appending an API token to your scans, WPScan transforms from a simple version-checker into an automated exploit-mapping engine.
Acquiring and Configuring the Engine
To activate this intelligence feed, you must register for a free API token at the official WPScan website. The free tier allows for 50 API requests per day, which is sufficient for targeted manual audits.
Rather than pasting your 32-character token into the terminal for every single command, you should export it directly into your environment variables. This keeps your terminal history clean and prevents accidental token leakage when generating reports.
export WPSCAN_API_TOKEN="your_32_character_token_here"Once exported, WPScan will automatically detect and utilize the token for all future scans within that terminal session.
The Tactical Execution: Mapping CVEs in Real-Time
With the API token active, we can now launch a surgical strike against the targets we identified in our Phase 1 reconnaissance.
We are not just looking for vulnerabilities; we are looking for the path of least resistance. We want high-severity flaws that require zero authentication.
wpscan --url https://target-staging.com --api-token $WPSCAN_API_TOKEN --enumerate vp,vt,tt,cb,dbe,u --plugins-detection aggressiveDeconstructing the Payload
--enumerate vp,vt,tt,cb,dbe,u: This flag instructs WPScan to enumerate Vulnerable Plugins, Vulnerable Themes, Timthumbs, Config Backups, Database Exports, and Users. Notice we are specifically asking for vulnerable assets, not just all assets.--plugins-detection aggressive: Standard detection relies on passive headers. Aggressive detection actively brute-forces common plugin paths to find hidden directories that developers tried to obscure.
Reading the Intelligence Output
When the scan completes with the API enabled, the output is fundamentally different. Instead of a simple "Outdated" warning, you will receive a tactical readout:
[!] Title: WooCommerce Product Add-ons < 3.0.0 - Unauthenticated Arbitrary File Upload [!] Reference:
- cve: CVE-2025-XXXX
- url: https://wpscan.com/vulnerability/12345
- exploitdb: https://www.exploit-db.com/exploits/67890
This output is the holy grail of Phase 2. WPScan has just done the heavy lifting for you. It identified the plugin, verified the exact version, cross-referenced it with the vulnerability database, and handed you a direct link to the Exploit-DB page containing the weaponized Python script needed to breach the server.
Weaponizing the Findings: From API to Exploit
Finding the CVE is only half the battle. The ultimate goal of this phase is to prepare the payload for Phase 03: Exploitation.
When the WPScan API returns a reference link, your workflow should immediately shift from scanning to analysis.
Step 1: Evaluating the Exploitability
Not all CVEs are created equal. An authenticated Cross-Site Scripting (XSS) vulnerability is practically useless if you don't already have subscriber or author credentials. You must filter your API results for flaws that fit your current access level. Prioritize:
- Unauthenticated Remote Code Execution (RCE): The golden ticket. Allows you to run system commands directly.
- Unauthenticated SQL Injection (SQLi): Allows you to dump the database and extract administrator password hashes.
- Arbitrary File Upload: Allows you to upload a malicious
.phpweb shell, effectively resulting in RCE.
Step 2: Retrieving the Proof of Concept (PoC)
Follow the links provided by the WPScan API output. Whether it points to Exploit-DB, a GitHub repository, or a Rapid7 module, you must secure the PoC code.
Read the code carefully before executing it. Many public exploits require minor modifications—such as adjusting the target URI path or changing the default payload—to work against your specific target.
Scaling Operations and Bypassing Restrictions
If you are managing high-growth auditing projects, the free tier limit of 50 API calls per day will quickly become a bottleneck. Furthermore, aggressive scanning will inevitably trigger modern Web Application Firewalls (WAFs), resulting in immediate IP bans.
To sustain continuous, large-scale vulnerability mapping:
- Enterprise API Tiers: Upgrading your WPScan API tier is non-negotiable for high-volume automated scanning pipelines.
- ISP Proxy Rotation: While the API token is tied to your WPScan account, the actual HTTP requests hitting the target WordPress site come from your machine. To prevent the target's SOC from blocking your IP address halfway through an aggressive plugin enumeration, you must route your WPScan traffic through dedicated ISP proxies. This ensures your scans remain uninterrupted and your origin infrastructure remains hidden.
The Transition to Next-Gen Tools
The WPScan API is powerful, but it relies on a centralized database that updates on a specific schedule. In the high-stakes world of zero-day vulnerabilities, waiting for a database to update means you are already behind the curve.
While WPScan remains a staple for establishing a baseline, modern tactical auditors supplement it with decentralized, community-driven frameworks.
With our WPScan data logged and our CVEs mapped, the next logical step in our WordPress Hacking Hub is to introduce a faster, more adaptable weapon to the arsenal. In the next masterclass, we will move beyond centralized databases and explore how to hunt for zero-days at scale using Nuclei Templates.