Skip to main content

CVE-2024-8274: WP Booking Calendar XSS Vulnerability

CVE-2024-8274 is a reflected cross-site scripting flaw in WP Booking Calendar plugin for WordPress that enables attackers to inject malicious scripts. This article covers the technical details, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-8274 Overview

CVE-2024-8274 is a Reflected Cross-Site Scripting (XSS) vulnerability in the WP Booking Calendar plugin for WordPress. The flaw affects all versions up to and including 10.5. It stems from insufficient input sanitization and output escaping on several parameters processed by the timeline_obj component. Unauthenticated attackers can inject arbitrary web scripts that execute when a victim clicks a crafted link. The weakness is tracked under CWE-79.

Critical Impact

Unauthenticated attackers can execute arbitrary JavaScript in the browser of any user who clicks a malicious link, potentially hijacking administrator sessions or performing privileged actions on vulnerable WordPress sites.

Affected Products

  • WP Booking Calendar plugin for WordPress, all versions through 10.5
  • WordPress sites running the booking plugin by wpbookingcalendar
  • Installations using the wpbc-class-timeline_v2.php timeline component

Discovery Timeline

  • 2024-08-30 - CVE-2024-8274 published to the National Vulnerability Database (NVD)
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-8274

Vulnerability Analysis

The vulnerability resides in the timeline rendering logic implemented in core/timeline/v2/wpbc-class-timeline_v2.php. Multiple parameters supplied through the timeline_obj object are reflected into HTML output without proper sanitization or escaping. An attacker can craft a URL containing JavaScript payloads in these parameters. When a victim visits the URL, the plugin reflects the payload back into the response, and the browser executes it in the context of the vulnerable WordPress site.

Exploitation requires user interaction, since the victim must click or load the attacker-controlled link. Successful exploitation can lead to session theft, forced administrative actions, credential harvesting through injected forms, or redirection to malicious infrastructure. Because the attack executes in the authenticated user's browser, administrator targets expose the full WordPress control plane.

Root Cause

The plugin accepts user-controlled values that populate properties of the timeline_obj structure and emits them directly into HTML attributes and markup. The affected code paths lack calls to WordPress sanitization helpers such as esc_attr(), esc_html(), or sanitize_text_field(). The vendor patch, visible in WordPress Plugin Change Log, adds escaping to the vulnerable sinks.

Attack Vector

The attack is delivered over the network through a crafted URL referencing the vulnerable plugin endpoint. No authentication is required to construct the payload, but the targeted user must interact with the link. Common delivery vectors include phishing emails, forum posts, and social media messages targeting WordPress administrators. See the Wordfence Vulnerability Report and WordPress Plugin Code Review for the vulnerable sink locations.

Detection Methods for CVE-2024-8274

Indicators of Compromise

  • Web server access logs containing requests to WP Booking Calendar endpoints with URL-encoded <script>, onerror=, onload=, or javascript: payloads in timeline_obj parameters
  • Unexpected outbound requests from administrator browsers to attacker-controlled domains following access to booking calendar pages
  • Creation of new WordPress administrator accounts or modification of user roles without a corresponding admin action in the audit log

Detection Strategies

  • Inspect HTTP request parameters tied to the timeline component for script tags, event handlers, and encoded JavaScript keywords
  • Deploy a web application firewall (WAF) rule set with signatures for reflected XSS targeting WordPress plugin query strings
  • Correlate referer headers pointing to external sites with subsequent anomalous admin-area activity

Monitoring Recommendations

  • Enable verbose access logging on WordPress hosts and forward logs to a centralized analytics platform for query and alerting
  • Monitor the WP Booking Calendar plugin version across all WordPress instances and alert when any site remains at 10.5 or earlier
  • Track browser Content Security Policy (CSP) violation reports to surface injection attempts against WordPress pages

How to Mitigate CVE-2024-8274

Immediate Actions Required

  • Upgrade the WP Booking Calendar plugin to a version newer than 10.5 that includes the fix from changeset 3143364
  • Audit WordPress administrator accounts and active sessions for signs of unauthorized activity
  • Rotate credentials and application passwords for any administrator who may have clicked suspicious links referencing the plugin

Patch Information

The vendor addressed the issue in the booking plugin trunk via WordPress Plugin Change Log. The patch adds proper escaping to the timeline_obj parameter handling in wpbc-class-timeline_v2.php. Administrators should update through the WordPress plugin dashboard or by replacing the plugin files with the fixed release.

Workarounds

  • Deploy a WAF rule to block requests containing script tags or JavaScript event handlers in query parameters directed at /wp-admin/ and plugin endpoints
  • Enforce a strict Content Security Policy that disallows inline scripts on WordPress admin and front-end pages served by the plugin
  • Temporarily deactivate the WP Booking Calendar plugin on sites that cannot be patched immediately
bash
# Configuration example: update the plugin via WP-CLI
wp plugin update booking --version=latest
wp plugin list --name=booking --fields=name,status,version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.