Executive brief
Kiwi TCMS is a test case and test result management system. The application accepts SVG file uploads from users without properly sanitizing them, allowing attackers with user accounts to embed malicious JavaScript code in SVG files. When other users view these files directly, the embedded JavaScript executes in their browsers, potentially allowing attackers to steal session credentials, modify test data, or perform other actions on behalf of victims.
Technical details
This is a stored cross-site scripting (XSS) vulnerability in Kiwi TCMS's file upload functionality. The root cause is insufficient sanitization of user-uploaded SVG files, which can contain embedded JavaScript code. An attacker with user privileges can upload a malicious SVG containing inline JavaScript; when other users view the file directly (not embedded in an HTML page), the JavaScript executes with the victim's privileges. The vulnerability requires both user authentication and user interaction (clicking/viewing the malicious file). Kiwi TCMS fixed this by serving responses with the Content-Security-Policy HTTP header to block inline JavaScript in modern browsers. All versions up to 12.0 are affected; the patch was released in version 12.1.
Affected products
- Kiwi TCMS Kiwi TCMS All versions up to and including 12.0
Timeline
- 2023-03-29: disclosed: Vulnerability independently disclosed by Antonio Spataro and @1d8
- 2023-03-30: advisory: GitHub advisory GHSA-2wcr-87wf-cf9j published
- 2023: patched: Fixed in version 12.1 with Content-Security-Policy header configuration