How to Use WPScan to Find WordPress Vulnerabilities (and Know What to Fix First)

feature image

The email arrives on a Tuesday morning: a plugin you rely on has a critical vulnerability. Your stomach drops a little, and one question takes over.

Is your site actually affected? Learning how to use WPScan gets you that answer from the outside, the way an attacker would see your site.

At MalCare, we track over 39,000 known WordPress vulnerabilities, so here’s the honest truth: a scan is only as useful as how well you read it. Running the tool is easy. Knowing which findings matter, and which don’t, is the real skill.

TL;DR: Install WPScan, add a free API token, and scan your site for vulnerable plugins and themes. Confirm each version, update or replace what’s affected, and scan again. WPScan finds known weaknesses, not malware, so keep MalCare’s vulnerability scanner watching for new flaws and its malware scanner checking for infections between your checks.

What WPScan actually tells you

WPScan is a command-line scanner that looks at your site from the outside. It sends requests, reads the responses, and works out which WordPress version, plugins, and themes you’re running. With an API token, it matches those findings against WPScan’s vulnerability database.

That outside-in view is its strength, because you see what anyone on the internet can see. It’s also its limit, and we’ll come back to that.

A quick clarification, because people mix these up all the time: WPScan isn’t WP-CLI. WP-CLI manages WordPress from the command line, and WPScan audits it. Every command here starts with wpscan, not wp.

WPScan also has a WordPress plugin, but WPScan says it’s no longer actively supported for non-enterprise customers. We’ll stick to the command-line tool, and this guide follows WPScan 4, released in May 2026. Run wpscan --version to see yours.

📝 Note: A vulnerability finding means a known weakness is present. It doesn’t tell you whether someone has already used it. If you’re seeing strange redirects, spam pages, or admin accounts you didn’t create, run a malware scan too. That’s a different question, and WPScan can’t answer it.

Before your first scan

Gather three things first:

  • Your site’s exact URL, with HTTPS and any subfolder WordPress lives in, like /blog/.
  • A current backup, because you’ll be updating plugins soon.
  • Permission, if it isn’t your site. Scanning a site you don’t own or manage without permission can land you in real trouble. For client sites, agree on scope and timing in writing.

One licensing point catches agencies out. WPScan’s free Researcher plan is for non-commercial use. WPScan’s license requires a commercial license when it’s used as part of a paid service, so check the terms before you audit client sites for money.

Step 1: Install WPScan

Pick the route for your system. If WPScan is already installed, update it the same way you installed it, so you don’t end up with two copies.

WPScan installation commands for different operating systems

Kali Linux has WPScan in its package manager, which WPScan recommends on pentesting distributions:

sudo apt update
sudo apt install wpscan

macOS uses Homebrew:

brew tap wpscanteam/tap && brew install wpscan

To update later, run brew upgrade wpscan.

Linux with Ruby installs it as a gem. WPScan 4 needs Ruby 3.3 or later, so check with ruby -v first:

gem install wpscan

To update later, run gem update wpscan. If the install fails on “native extensions,” you’re usually missing a compiler or Ruby’s development headers.

Windows works best through Docker Desktop or WSL, Windows’ built-in Linux environment. With Docker running:

docker pull wpscanteam/wpscan:latest

Docker doesn’t create a wpscan command on your machine. You’ll use the full docker run command in Step 4 instead.

Check that it works on a native install:

wpscan --version
wpscan --update

--update refreshes WPScan’s local database of plugin and version data. It doesn’t give you vulnerability data. That comes from the API, next.

Step 2: Add your free API token

Without a token, WPScan still finds your plugins and themes, but it can’t tell you which ones are vulnerable. And that’s the part you came for.

Create a free account at WPScan.com and copy the API token from your profile.

WPScan account page showing the API token

The easiest way to stop typing the token is a config file. New WPScan 4 installs read ~/.config/wpscan/. Installs upgraded from older versions keep using ~/.wpscan/. For a new install:

mkdir -p ~/.config/wpscan
nano ~/.config/wpscan/scan.yml

Add these two lines, with your token:

cli_options:
  api_token: 'YOUR_API_TOKEN'

Then lock the file down, so only you can read it:

chmod 600 ~/.config/wpscan/scan.yml

Keep this file out of shared folders, repositories, and screenshots. Your token is a password for your API allowance.

📝 Note: The free plan gives you 25 API calls a day, not 25 scans. WPScan uses one call for your WordPress version, one per plugin, and one per theme. A site with 30 plugins can burn through the day’s allowance in a single scan. When the calls run out, WPScan keeps scanning without vulnerability data, so an empty vulnerability section isn’t an all-clear. Check the API messages in your output.

Step 3: Make sure WPScan can reach your site

Run a quick, gentle scan first:

wpscan --url https://example.com --detection-mode passive

Swap in your own URL. Use the public address, not /wp-admin/. WPScan 4’s default detection mode is mixed, which sends more probing requests. Passive mode looks for clues in normal page responses, so it’s the gentler choice for a first check.

Check that the URL in the output is the one you meant, and fix any connection or API errors before you go further. Don’t expect a plugin list yet. WPScan 4’s basic scan only checks your WordPress version, active theme, and security findings. Plugins come next.

Step 4: Scan for vulnerable plugins and themes

WPScan calls the search for plugins and themes enumeration. This scan looks for plugins and themes with known vulnerabilities, and saves a clean report:

WPScan plugin enumeration results
wpscan --url https://example.com \
  --enumerate vp,vt \
  --plugins-detection passive \
  --format cli-no-colour \
  --output wpscan-report.txt

Here’s what each part does:

WPScan vulnerability report output
  • --enumerate vp,vt looks for vulnerable plugins (vp) and vulnerable themes (vt).
  • --plugins-detection passive keeps plugin discovery gentle. Leave it out, and WPScan 4 probes harder.
  • --format cli-no-colour gives you plain text without terminal color codes. Use --format jsonl instead if you want results to stream as they’re found.
  • --output saves the report to a file in your current folder.

One subtlety trips people up. vp means “plugins with vulnerability records,” not “your plugin is vulnerable.” WPScan still has to detect your version and check it against the affected range. An up-to-date plugin can still show up, listed with old, already-fixed vulnerabilities.

Name the checks you want. A bare -e with no options runs a long list of extras, including username, backup folder, and media checks, which you may not want in a first scan.

Want an exact plugin list? Use --wp-auth

Passive scanning only finds plugins that leave visible clues. If you own the site, WPScan 4 can skip the guessing entirely. Give it a WordPress Application Password, and it asks your site’s REST API for every installed plugin and theme, active or inactive:

wpscan --url https://example.com \
  --wp-auth yourusername:"xxxx xxxx xxxx xxxx xxxx xxxx" \
  --enumerate vp,vt \
  --format cli-no-colour \
  --output wpscan-report.txt

Create the Application Password under Users → Profile → Application Passwords in wp-admin, using an administrator account. Your normal login password won’t work here, and WordPress rejects it on purpose. Name it “WPScan” and revoke it once the audit’s done.

It’s a real credential for your site, so keep it out of scripts and screenshots.

Running it with Docker

Docker reads the token from an environment variable called WPSCAN_API_TOKEN. Enter it at a hidden prompt, so it never appears on screen:

read -r -s -p "WPScan API token: " WPSCAN_API_TOKEN
printf '\n'
export WPSCAN_API_TOKEN

Update the database into a named volume, so it’s kept between runs:

docker run --rm -it \
  -v wpscan-db:/wpscan/.cache/wpscan/db \
  wpscanteam/wpscan --update

Then run the scan, saving the report on your own machine:

docker run --rm -i \
  --env WPSCAN_API_TOKEN \
  -v wpscan-db:/wpscan/.cache/wpscan/db \
  wpscanteam/wpscan \
  --url https://example.com \
  --enumerate vp,vt \
  --plugins-detection passive \
  --no-update \
  --format cli-no-colour | tee wpscan-report.txt

When you’re done, clear the token from your shell with unset WPSCAN_API_TOKEN. Treat the report as private too, because it lists your versions and any exposed paths.

Step 5: Decide what needs fixing first

A long report can look scary, but most of it is context. Here’s how we’d work through it.

Confirm the component and version first. Compare each finding with the plugins and themes in your dashboard. A black-box scan works out versions from public files, and a cache can serve older files than the ones you’ve installed. If WPScan can’t tell the version, check it yourself before deciding anything.

WPScan identifying a vulnerable WordPress plugin and version

Then read the advisory. Each finding links to one. Check three things: the affected versions, the fixed version, and whether an attacker needs to be logged in. A flaw that needs no login is more urgent than one that needs an administrator account.

WPScan vulnerability details and advisory information

📝 Note: “Fixed in” is the first release that fixed that one flaw. It isn’t always the version to install today, because later releases may fix more. Update to the latest supported release.

Use the CVSS score to gauge severity. CVSS rates technical severity from 0 to 10, using these standard bands:

WPScan WordPress vulnerability severity information
CVSS scoreSeverity
9.0–10.0Critical
7.0–8.9High
4.0–6.9Medium
0.1–3.9Low
0.0None

The vector string behind the score tells you more than the number. AV:N means the attack works over the network, PR:N means no login is needed, and UI:N means no one else has to click anything. A high score with all three is the one to fix first, especially if it’s being actively exploited.

Don’t confuse CVSS with a CVE ID. The CVE ID names the flaw, and the CVSS score rates it. Use the CVE to match advisories and vendor fixes about the same issue.

Finally, separate exposure from compromise. A listed username or an open XML-RPC endpoint needs context, not panic. An exposed database export or config backup is serious: remove it, check who might have downloaded it, and change any credentials it contained.

Step 6: Fix it, then prove it’s fixed

Keep your first report, because you’ll want it for comparison.

Update the affected plugin or theme, with a fresh backup in place. Test anything that could affect how the site works. If there’s no fix, remove or replace the component.

If you can’t update right away, protection buys you time. A virtual patch is a firewall rule that blocks attacks on one specific flaw, without touching the plugin’s code. MalCare’s Vulnerability Shield adds virtual patches usually within hours of a flaw going public, on paid plans, and keeps blocking that flaw until you install the official fix.

📝 Note: A virtual patch doesn’t change the plugin’s version, so WPScan will keep reporting the vulnerability until you update. That’s expected. Check the patch status in your MalCare dashboard, and rescan after the real update.

Then run the same scan again, with a new report name. Check that the version changed and the finding is gone. If it’s still there, compare the advisory with your installed version, and look for a cache serving old files. Keep the before report, the change, and the after report together.

It’s your proof of work, and it’s gold for client handovers.

Other findings worth a look

WPScan can check for more than plugins. These findings deserve attention when they appear:

WPScan interface for selecting security checks
FindingWhy it mattersWhat to do
Config backupsCopies can expose database passwords and security keysRemove public copies and change the exposed credentials
Database exportsDownloads can contain content and user dataRemove public access and review what was exposed
Backup foldersFolders left by backup plugins can hold full site copiesMove backups out of public reach
XML-RPC enabledIt’s a common route for password guessing attacksCheck what depends on it before you restrict it
HTTPS problemsLogins and data may travel unencryptedFix the certificate, redirects, or HTTPS settings

WPScan’s own password-attack options run through XML-RPC, which tells you exactly why attackers like it. To check for config backups, database exports, and backup folders together:

WPScan security check options for exposed files and folders
wpscan --url https://example.com \
  --enumerate cb,dbe,bf \
  --format cli-no-colour \
  --output wpscan-exposure-report.txt

These checks send extra requests and only look for common file and folder names, so a clean result isn’t a guarantee. And WPScan only reports. Don’t switch off XML-RPC or anything else just because it shows up. Check what depends on it first.

WPScan security check results

When WPScan misses plugins or refuses to scan

“No plugins found.” First, check that you added -e vp,vt or -e ap, since WPScan 4 doesn’t scan plugins on its own. Then compare the report with your dashboard. If plugins are missing and you own the site, use --wp-auth for an exact list. Otherwise, try mixed detection, which adds active checks and more requests:

wpscan --url https://example.com \
  --enumerate vp,vt \
  --plugins-detection mixed \
  --format cli-no-colour \
  --output wpscan-mixed-report.txt

“No API token given” or an invalid token. Check the file name, the two-space indent in your YAML, and which config folder your install reads. On Docker, make sure the token was exported in the same shell.

“The site does not seem to be running WordPress.” Check the URL, redirects, and subfolder. A password page or firewall challenge can hide WordPress. --force skips this check, and in WPScan 4 it also skips the 403 check, so only use it once you’ve confirmed the site runs WordPress.

HTTP 403 or a firewall challenge. Your firewall is doing its job. Don’t use --force to push past a firewall on a site you don’t control. If it’s your site and the audit needs WPScan to get through, add a narrow, temporary exception for your scanning IP, and remove it afterward. A blocked scan tells you nothing about the plugins behind the firewall.

Server errors or an overloaded host. Check your hosting logs first. If the scan is too much for the server, slow it down:

wpscan --url https://example.com \
  --enumerate vp,vt \
  --throttle 1000 \
  --format cli-no-colour \
  --output wpscan-throttled-report.txt

--throttle waits the given number of milliseconds between requests, and WPScan automatically drops to one thread when you use it. If errors continue, stop and talk to your host before trying again.

Between scans, keep watching

A WPScan report is a snapshot. New vulnerabilities are disclosed constantly, and attackers don’t wait for your next audit. That’s why we built MalCare to keep watching between checks. Its vulnerability scanner checks your plugins, themes, and WordPress core daily and names the fix when it flags something.

MalCare security summary showing ongoing WordPress monitoring

Vulnerability Shield covers new flaws with virtual patches within hours on paid plans. And the malware scanner checks your files and database, with the heavy analysis running on our servers and one-click cleanup on Repair and Fortify plans.

Use WPScan when you want an independent, outside-in check. Let ongoing WordPress security cover the days in between.

FAQs

Can I use WPScan without an API token?

Yes, but you won’t see vulnerability data. WPScan still detects your WordPress version, plugins, and themes. The token is what connects those findings to known vulnerabilities, and wpscan --update doesn’t replace it.

Is WPScan free?

The CLI scanner is free, and the API is free for non-commercial use, up to 25 calls a day. Commercial use, like paid client audits, needs a commercial license. Check WPScan’s current terms before you rely on it for client work.

Can I use WPScan on Windows?

Yes, through Docker Desktop or WSL. Run the commands in this guide inside your Linux environment. With Docker, use the docker run version of each command.

Does WPScan detect or remove malware?

No. WPScan finds known vulnerabilities and exposed files. To check your files and database for malware, use a WordPress security plugin like MalCare, which also handles malware scanning and cleanup.

Do I need to run password attacks to check plugin vulnerabilities?

No. Plugin and theme checks never guess passwords. WPScan can run password attacks, but that’s a separate task with its own permissions and lockout risks, and nothing in this guide does it.

Conclusion

That Tuesday-morning email doesn’t have to mean guesswork. Scan, confirm the version, read the advisory, fix what’s affected, and scan again, and you’ll know exactly where your site stands, with the reports to prove it.

Akshat is the Founder and CEO of BlogVault, MalCare, and WP Remote. These WordPress plugins, designed for complete website management, allows 100,000+ customers to build and manage high-performance websites with ease.