# 🌐 WordPress Security Scanner - REST API User & Draft Leaks (`renzomacar/wordpress-security-scanner`) Actor

WordPress security scanner. Probes the WordPress REST API for endpoints leaking users, plugins, drafts and customer data - the misconfigurations attackers enumerate before a brute-force. 40% of the web runs WordPress. Counts only, no data exfiltrated. Fix guidance included. By Renzo Madueno.

- **URL**: https://apify.com/renzomacar/wordpress-security-scanner.md
- **Developed by:** [Renzo Madueno](https://apify.com/renzomacar) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.65 / 1,000 security findings

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## WordPress Security Scanner — REST API User & Draft Leaks

Probes a WordPress site's REST API the way an unauthenticated attacker would, surfacing the endpoints that leak data by default: user enumeration, draft posts, the installed-plugin list, site settings, and misconfigured WooCommerce customer/order routes. For WordPress site owners, agencies and pentesters checking their own installs.
**Pricing: $0.02 per run + $0.005 per finding.** Non-destructive — read-only, unauthenticated GETs, nothing written or altered.

### Why default WordPress leaks

WordPress powers ~43% of the web, and its REST API is **on and mostly public by default**. Without hardening, anyone can query, no auth required:

| Endpoint | What it hands an attacker |
|---|---|
| `/wp-json/wp/v2/users` | Every user's login slug + display name → a username list for brute force |
| `/wp-json/wp/v2/posts?status=draft` | Unpublished draft content |
| `/wp-json/wp/v2/plugins` | Installed plugins + versions → a ready-made CVE checklist |
| `/wp-json/wp/v2/settings` | Admin email, blog name, other site settings |
| `/wp-json/wc/v3/customers`, `/orders` | WooCommerce customer emails/addresses if API keys are misconfigured |

Security plugins (Wordfence, iThemes) catch some of these and miss others. This scanner checks the core, WooCommerce and common-plugin endpoints in one pass and shows you exactly what's exposed.

### Run it in two ways

```json
{
  "wordpressUrl": "https://your-site.com/",
  "endpointHints": ["custom/v1/private-route"],
  "outputFormat": "both"
}
```

- Provide `wordpressUrl` to scan your live site.
- **Leave inputs empty and click Run** for a DEMO sample report — see the output shape with no target.
- `endpointHints` adds custom routes to probe; `outputFormat` is `json`, `html-report`, or `both`.

### What you get back

- **Dataset rows** — one structured finding each, severity-coded, with a `curl` reproducer.
- **HTML report** in the run's KV store — severity-coded findings plus paste-ready fix code.

```
[CRITICAL] /wp/v2/users — user enumeration
Total records: 12
Reproducer: curl 'https://your-site.com/wp-json/wp/v2/users'
```

### The fix ships with the finding

Every run includes a drop-in must-use plugin. Put it at `wp-content/mu-plugins/disable-anon-rest.php` and re-scan:

```php
<?php
add_filter('rest_endpoints', function ($endpoints) {
  if (!current_user_can('list_users')) {
    unset($endpoints['/wp/v2/users']);
    unset($endpoints['/wp/v2/users/(?P<id>[\d]+)']);
  }
  return $endpoints;
});
add_filter('rest_pre_dispatch', function ($result, $server, $request) {
  $route = $request->get_route();
  foreach (['/wp/v2/plugins', '/wp/v2/themes', '/wp/v2/settings'] as $denied) {
    if (str_starts_with($route, $denied) && !current_user_can('manage_options')) {
      return new WP_Error('rest_forbidden', 'Forbidden.', ['status' => 401]);
    }
  }
  return $result;
}, 10, 3);
```

Prefer a plugin? "Disable WP REST API" blocks all anonymous access; Wordfence Premium has REST hardening rules.

### Ethical use

Scan only sites you own or have explicit permission to test. All probes are read-only, unauthenticated GETs — identical to what any anonymous visitor's browser could request — so the scan itself changes nothing.

### FAQ

**Is scanning my own WordPress site safe?**
Yes. It performs only unauthenticated GET requests against public REST endpoints — no writes, no login attempts, no exploitation. It reads exactly what an anonymous visitor already can.

**How is this different from Wordfence or a WPScan run?**
Those are broad malware/vulnerability suites. This is focused specifically on REST-API data exposure (user enumeration, drafts, plugin disclosure, WooCommerce leaks) and returns a copy-paste mu-plugin fix per finding — a fast, targeted check you can run on a schedule.

**What's a billable finding?**
Each exposed endpoint detected is one $0.005 dataset item; the run is $0.02. A properly hardened site returns few or no findings.

**Does it exploit the vulnerabilities or read private data?**
No — it confirms an endpoint responds to an anonymous request and records the count/shape. It does not dump customer records or attempt any write.

**Can I scan a WooCommerce store's customer data exposure?**
Yes — the WooCommerce `/wc/v3/customers` and `/orders` routes are probed; a finding there means API-key misconfiguration is leaking customer data and should be fixed immediately.

**Can I try it before pointing it at my site?**
Yes — run with empty inputs for a demo report.

**I found leaks — can someone just fix it for me?**
A $29 quick scan + report and a $99 full hardening (custom mu-plugin written, installed and verified, money-back) are available, plus weekly auto-scans at [rls-monitor.vercel.app](https://rls-monitor.vercel.app/).

### Sister scanners

For other backends: [Supabase](https://apify.com/renzomacar/supabase-rls-scanner), [Firebase](https://apify.com/renzomacar/firebase-security-auditor), [Strapi](https://apify.com/renzomacar/strapi-security-scanner), [Directus](https://apify.com/renzomacar/directus-security-scanner), [Payload](https://apify.com/renzomacar/payload-security-scanner), [Convex](https://apify.com/renzomacar/convex-security-scanner), [Hasura](https://apify.com/renzomacar/hasura-security-scanner), [PocketBase](https://apify.com/renzomacar/pocketbase-security-scanner), [Nhost](https://apify.com/renzomacar/nhost-security-scanner).

# Actor input Schema

## `wordpressUrl` (type: `string`):

Your WordPress site URL, e.g. https://your-site.com. Leave empty + click Run for a sample report.

## `endpointHints` (type: `array`):

Beyond the default WordPress core + common plugin endpoints, list custom routes you've registered.

## `outputFormat` (type: `string`):

JSON for programmatic use; HTML report saved to KV store under report.html.

## Actor input object example

```json
{
  "endpointHints": [],
  "outputFormat": "both"
}
```

# Actor output Schema

## `results` (type: `string`):

All result items as JSON.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("renzomacar/wordpress-security-scanner").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("renzomacar/wordpress-security-scanner").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call renzomacar/wordpress-security-scanner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,renzomacar/wordpress-security-scanner"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/bDd7sLs97nTb196gN/builds/Vwsn3aKZGRUwgdxgd/openapi.json
