CVE-2024-1590
Executive Summary
CVE-2024-1590 is a Stored Cross-Site Scripting (XSS) vulnerability in the Page Builder: Pagelayer – Drag and Drop website builder plugin for WordPress. The flaw exists in the plugin's Button Widget across all versions up to and including 1.8.2. It arises from insufficient input sanitization and output escaping on user-supplied attributes, allowing authenticated attackers with contributor-level permissions or higher to inject arbitrary web scripts. These scripts execute whenever a victim accesses the compromised page.
This vulnerability is specific to the WordPress ecosystem and does not affect the underlying web server (Apache/Nginx). The CVSS score is 4.6 (Medium), and the EPSS probability is 0.0%, indicating low active exploitation in the wild. No public exploit code or patch details are currently available.
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 not related to NPM, PyPI, Go, or Ruby packages. It is a WordPress plugin issue and should be managed through the WordPress plugin update mechanism.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Base Score: 4.6 (Medium)
- Attack Vector (AV): Network (N) – The vulnerability is exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): Low (L) – Attacker needs contributor-level access.
- User Interaction (UI): Required (R) – Victim must visit the injected page.
- Scope (S): Changed (C) – Impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): None (N) – No impact on availability.
Threat Level: Medium. The requirement for authenticated access reduces the attack surface, but the stored nature of the XSS can lead to persistent compromise of user sessions and data.
Deep Dive & Mechanics
The vulnerability resides in the Pagelayer plugin's Button Widget. When a user with contributor-level or higher privileges creates or edits a page using the widget, the plugin fails to properly sanitize and escape user-supplied attributes (e.g., onclick, style, or custom data attributes). An attacker can inject malicious JavaScript code into these attributes, which is then stored in the WordPress database. When any user (including administrators) views the page, the injected script executes in their browser context.
Attack Flow:
- Attacker logs in with contributor-level credentials.
- Attacker creates a new page or edits an existing one using Pagelayer.
- Attacker adds a Button Widget and injects a malicious payload into an attribute (e.g.,
onmouseover="alert('XSS')"). - The payload is stored in the database without proper sanitization.
- Victim (e.g., admin or visitor) accesses the page.
- The malicious script executes, potentially stealing cookies, redirecting to phishing sites, or performing actions on behalf of the victim.
Vulnerable vs. Patched Code
Vulnerable Code (Pagelayer <= 1.8.2):
The plugin likely uses esc_attr() or similar functions incorrectly, or fails to escape attributes that are dynamically generated. For example:
// Vulnerable: Direct output without escaping
echo '<div class="pagelayer-button" ' . $attributes . '>';
Patched Code (Hypothetical):
A patch would involve proper escaping using esc_attr() and wp_kses():
// Patched: Escape all attributes
echo '<div class="pagelayer-button" ' . esc_attr($attributes) . '>';
Since no official patch is available, users should disable the plugin or apply a Web Application Firewall (WAF) rule.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with Pagelayer plugin <= 1.8.2.
- Contributor-level account.
Steps:
- Log in to WordPress as a contributor.
- Navigate to Pages > Add New.
- Add a Pagelayer Button Widget.
- In the widget settings, inject a payload into an attribute (e.g.,
onclick):<button onclick="alert(document.cookie)">Click Me</button> - Save and publish the page.
- Share the page link with the victim.
Expected Result: When the victim clicks the button, the JavaScript executes.
Blue Team (Detection & Mitigation)
Detection:
- Monitor for unusual attribute values in Pagelayer widgets.
- Use WAF rules to block common XSS payloads.
Mitigation:
- Disable the Pagelayer plugin until a patch is available.
- Restrict contributor-level permissions.
- Implement Content Security Policy (CSP) headers.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/pagelayer/(entire plugin directory) - Database: Suspicious
post_contententries containing<script>tags or event handlers (e.g.,onclick,onmouseover). - Network: Outbound connections to attacker-controlled domains from WordPress admin pages.
- Logs: WordPress debug logs showing unexpected JavaScript execution.
Detection Engineering
YARA Rule
rule CVE_2024_1590_Pagelayer_XSS {
meta:
description = "Detects Pagelayer plugin files with potential XSS payloads"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-1590"
strings:
$xss_payload = /on\w+\s*=\s*["'][^"']*script[^"']*["']/ nocase
$pagelayer_file = "pagelayer" nocase
condition:
$pagelayer_file and $xss_payload
}
Sigma Rule
title: CVE-2024-1590 Pagelayer Stored XSS Detection
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects stored XSS attempts via Pagelayer Button Widget
author: Valters IT
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains: "/wp-admin/post.php"
http.method: "POST"
http.body|contains: "pagelayer"
http.body|contains|re: "on\w+\s*="
condition: selection
falsepositives:
- Legitimate use of event handlers by developers
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-1590 Pagelayer Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/post.php"; http_uri; content:"pagelayer"; http_client_body; pcre:"/on\w+\s*=\s*[\x22\x27][^\x22\x27]*script[^\x22\x27]*[\x22\x27]/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable the Pagelayer plugin until an official patch is released.
- Short-term: Implement a Web Application Firewall (WAF) rule to block XSS payloads in POST requests to
wp-admin/post.php. - Long-term: Update to a patched version once available. Monitor the Pagelayer plugin page for updates.
- Administrative: Review and restrict user roles. Remove contributor-level access for untrusted users.
- Monitoring: Enable WordPress audit logging and review for suspicious page edits.
Valters IT
DevSecOps & Cyber Threat Intelligence
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.