Documents / Sentinel Security / Features

REST API Diagnosis

REST API Diagnosis

REST API Diagnosis inspects the access control state of each WordPress REST API endpoint and scores information disclosure risks.

Why REST API Diagnosis Is Necessary

The WordPress REST API is enabled by default, and many endpoints are accessible without authentication. This creates the following risks:

  • User information leaks: Admin usernames can be retrieved via /wp-json/wp/v2/users
  • Content data leaks: Draft posts or private information may be readable through the API
  • Plugin information exposure: Installed plugin versions can be identified
  • Attack reconnaissance: Gathered information can be used to launch brute-force or zero-day attacks
The /wp-json/wp/v2/users endpoint is particularly susceptible to username enumeration attacks, which serve as the first step in brute-force attacks.

Diagnostic Items (18 Items)

User Information (5 items)

Check ItemRiskSeverity
/wp/v2/users endpointWhether user list can be retrieved🔴 High
?author=N enumerationUsername identification via Author ID🔴 High
oEmbed user exposureWhether author name is included in oEmbed responses🟠 Medium
User metadataCustom field exposure for users🟡 Low
User role exposureUser role (permission) information🟡 Low

Content (5 items)

Check ItemRiskSeverity
/wp/v2/posts unauthenticated accessDetailed post data retrieval🟡 Low
/wp/v2/pages unauthenticated accessDetailed page data retrieval🟡 Low
/wp/v2/media file listingMedia file list retrieval🟠 Medium
/wp/v2/comments full exposureComment data and author emails🟠 Medium
Draft/private post exposureAccess to unpublished content🔴 High

System Information (4 items)

Check ItemRiskSeverity
REST API route listingExposure of all available endpoints🟠 Medium
/wp/v2/pluginsPlugin information exposure🔴 High
/wp/v2/themesTheme information exposure🟠 Medium
WordPress version exposureVersion info in API responses🟠 Medium

XML-RPC (4 items)

Check ItemRiskSeverity
xmlrpc.php enabledBrute-force via XML-RPC🔴 High
system.listMethodsList of available XML-RPC methods🟠 Medium
pingback.pingAbuse for DDoS amplification attacks🔴 High
wp.getUsersBlogsUser authentication testing🟠 Medium

Score Calculation

Each item has a weight, and points are deducted based on the severity of detected issues.

  • 🔴 High severity: -10 to -15 points
  • 🟠 Medium severity: -5 to -8 points
  • 🟡 Low severity: -2 to -3 points
The final score is the result of subtracting from a perfect score of 100.
ScoreRating
90–100Excellent: Nearly all risks are mitigated
70–89Good: Major risks are addressed
50–69Needs Improvement: Some significant risks remain
0–49Critical: Urgent action required

Running the Diagnosis

  1. Navigate to SentinelSecurityREST API Diagnosis
  2. Click the Run Diagnosis button
  3. Results for each check item are displayed in card format

Using Diagnosis Results

Issues identified in the diagnosis can be addressed comprehensively using the Pro version's API Protection feature. With the Free version, the following manual countermeasures are necessary:

Quick Fixes (Manual)

Prevent user enumeration (add to functions.php):

// Disable user enumeration via REST API
add_filter('rest_endpoints', function($endpoints) {
    unset($endpoints['/wp/v2/users']);
    return $endpoints;
});

Disable XML-RPC:

add_filter('xmlrpc_enabled', '__return_false');

Pro Version Countermeasures

Enable the API Protection feature to selectively block specific endpoints from the admin dashboard. See the "API Protection" documentation for details.