Executive brief
Vuetify is a popular Vue.js UI component library used to build web applications. The VCalendar component fails to properly sanitize the eventName function, allowing attackers to inject malicious JavaScript code that executes in users' browsers. An attacker can craft a calendar event with XSS payload that, when viewed by users with a vulnerable version, steals session cookies or sensitive data, or performs unauthorized actions on their behalf.
Technical details
The vulnerability is a Cross-Site Scripting (CWE-79) flaw in Vuetify versions 2.0.0-beta.4 through 2.6.9, located in the eventName function of the VCalendar component. The vulnerable code fails to properly sanitize or escape input before rendering it as HTML, allowing arbitrary JavaScript injection. An attacker can supply a malicious eventName value containing JavaScript code; when a user accesses a calendar view with the v-calendar component and the :event-name prop set to a custom function, the payload executes in the user's browser context with network-level attack vector and no authentication required. The vulnerability requires user interaction (viewing the calendar). A fix was released in version 2.6.10.
Affected products
- Vuetify Vuetify 2.0.0-beta.4 to 2.6.9
Timeline
- 2022-09-08: disclosed: Vulnerability reported via GitHub issue #15757
- 2022-09-19: advisory: Security advisory GHSA-q4q5-c5cv-2p68 published
- 2022-09-19: patched: Fix released in version 2.6.10