Executive brief
The Amelia booking plugin for WordPress allows unauthenticated users to create fake appointments with malicious content in customer name fields. When administrators view the calendar, hovering over these appointments triggers JavaScript code that can steal session cookies or perform actions on their behalf. This is a serious risk because administrative calendars often contain sensitive booking information.
Technical details
The vulnerability is a Stored Cross-Site Scripting (XSS) vulnerability arising from insufficient input validation and output encoding. The root cause is a two-stage failure: first, an authentication bypass in AddBookingCommand (Command.php line 186) skips nonce verification, allowing unauthenticated booking submissions. Second, while the plugin sanitizes customer firstName and lastName via sanitize_text_field(), this function only removes HTML tags but preserves special characters including double quotes. The injected payload then escapes into JavaScript template literals in the FullCalendar eventContent callback (redesign/dist/index.js line 199), where it is rendered via innerHTML without proper HTML entity encoding. An attacker can inject payloads such as '" onmouseover="alert(document.cookie)"' to break out of the title attribute and execute event handlers. The attack vector is network-based and requires only an unauthenticated user to craft a malicious booking; code execution occurs when an administrator hovers over the appointment on the Calendar page. A patch addressing both the authentication bypass and output encoding is recommended.
Affected products
- Elfsight Amelia Booking for Appointments and Events Calendar up to and including 2.2
Timeline
- 2026-08-28: disclosed