CVE-2025-12366
Executive Summary
CVE-2025-12366 is an Insecure Direct Object Reference (IDOR) vulnerability affecting the Page Builder: Pagelayer – Drag and Drop website builder plugin for WordPress in all versions up to and including 2.0.5. The flaw resides in the pagelayer_replace_page function, which lacks proper validation on a user-controlled key. This allows authenticated attackers with Author-level access or higher to replace media files belonging to other users, including administrators. The vulnerability has a CVSS score of 4.3 (Medium) and an EPSS score of 0.0%, indicating low exploitation probability in the wild. No public proof-of-concept or exploit code is currently available, and no patch has been released by the vendor.
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 is specific to the WordPress ecosystem and the Pagelayer plugin. It does not affect NPM, PyPI, Go, or Ruby packages. The risk is limited to WordPress sites running the vulnerable plugin version.
CVSS Breakdown & Threat Level
- CVSS Score: 4.3 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (Author-level)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: None
- Integrity Impact: Low (unauthorized file replacement)
- Availability Impact: None
The threat level is considered Medium due to the low privileges required and the potential for integrity impact. However, the lack of public exploits and low EPSS score reduces immediate risk.
Deep Dive & Mechanics
The vulnerability is an Insecure Direct Object Reference (IDOR) in the pagelayer_replace_page function. This function is used to replace page content or media files. The flaw occurs because the function accepts a user-controlled key (likely a post ID or media attachment ID) without verifying that the authenticated user owns or has permission to modify the target object.
Attack Flow:
- An attacker authenticates with Author-level privileges.
- The attacker crafts a request to the
pagelayer_replace_pagefunction, specifying a target media file ID belonging to another user (e.g., an administrator). - The function processes the request without checking ownership, allowing the attacker to replace the media file with malicious content.
- This could lead to defacement, phishing, or other malicious activities if the replaced file is used in critical areas.
The vulnerability is classified under CWE-639 (Authorization Bypass Through User-Controlled Key). The missing validation on the key allows unauthorized access to resources.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is presumed to be in the pagelayer_replace_page function. A patched version would include an ownership check.
Vulnerable Code (Conceptual):
function pagelayer_replace_page() {
$post_id = $_POST['post_id'];
// No ownership check
wp_update_post(array('ID' => $post_id, 'post_content' => $_POST['content']));
}
Patched Code (Conceptual):
function pagelayer_replace_page() {
$post_id = $_POST['post_id'];
$post = get_post($post_id);
if ($post->post_author != get_current_user_id() && !current_user_can('edit_others_posts')) {
wp_die('Unauthorized');
}
wp_update_post(array('ID' => $post_id, 'post_content' => $_POST['content']));
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- WordPress instance with Pagelayer plugin version <= 2.0.5.
- Authenticated user with Author-level privileges.
- Knowledge of a target media file ID (e.g., from another user's upload).
Exploitation Steps:
- Log in as an Author.
- Identify a target media file ID (e.g., via media library enumeration).
- Send a POST request to the WordPress AJAX endpoint:
POST /wp-admin/admin-ajax.php Content-Type: application/x-www-form-urlencoded action=pagelayer_replace_page&post_id=TARGET_MEDIA_ID&content=NEW_CONTENT - The media file is replaced with the attacker's content.
Note: No public exploit code is available. The above is a conceptual demonstration.
Blue Team
Detection:
- Monitor AJAX requests to
admin-ajax.phpwith thepagelayer_replace_pageaction. - Alert on requests where the
post_idparameter does not match the user's own posts. - Review logs for unusual file replacement activities.
Hunting:
- Search for
pagelayer_replace_pagein web server logs. - Correlate with user IDs and post IDs to detect unauthorized access.
Indicators of Compromise (IOCs)
- Network:
- POST requests to
/wp-admin/admin-ajax.phpwithaction=pagelayer_replace_page. - Unusual
post_idvalues in AJAX requests from Author-level users.
- POST requests to
- File System:
- Modified media files in
wp-content/uploads/with unexpected content. - Changes to post content that do not match user permissions.
- Modified media files in
- Logs:
- WordPress debug logs showing
pagelayer_replace_pagecalls with mismatched user IDs.
- WordPress debug logs showing
Detection Engineering
YARA Rule
rule CVE_2025_12366_Pagelayer_IDOR {
meta:
description = "Detects exploitation attempts of CVE-2025-12366 in Pagelayer plugin"
author = "Valters IT"
date = "2025-04-01"
reference = "CVE-2025-12366"
strings:
$ajax_action = "pagelayer_replace_page"
$post_id_param = "post_id="
condition:
$ajax_action and $post_id_param
}
Sigma Rule
title: Pagelayer IDOR Exploitation Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to exploit CVE-2025-12366 via AJAX requests
author: Valters IT
date: 2025-04-01
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: POST
cs-uri-query|contains:
- "action=pagelayer_replace_page"
- "post_id="
condition: selection
falsepositives:
- Legitimate plugin usage by administrators
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2025-12366 Pagelayer IDOR Exploitation Attempt";
flow:to_server,established;
content:"POST"; http_method;
content:"/wp-admin/admin-ajax.php"; http_uri;
content:"action=pagelayer_replace_page"; http_client_body;
content:"post_id="; http_client_body;
sid:10000001;
rev:1;
reference:cve,2025-12366;
classtype:attempted-user;
priority:2;
)
Remediation & Mitigation
Immediate Actions:
- Disable the Pagelayer plugin until a patch is released.
- Restrict Author-level permissions to prevent exploitation.
- Monitor logs for suspicious AJAX requests.
Long-term Fix:
- Apply the vendor patch when available.
- Implement a Web Application Firewall (WAF) rule to block
pagelayer_replace_pagerequests from non-admin users. - Conduct a security audit of the plugin code.
Workaround:
- Use a custom plugin or code snippet to add ownership checks to the
pagelayer_replace_pagefunction.
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.