Visionatrix Reflected Cross-Site Scripting Vulnerability Allowing Application Takeover and Secret Exfiltration
Vulnerability
A reflected cross-site scripting vulnerability has been identified in Visionatrix, an AI media processing tool that utilizes ComfyUI. This issue affects versions 1.5.0 prior to 2.5.1. The vulnerability resides in the '/docs/flows' endpoint, which is susceptible to an attack that can lead to a complete takeover of the application and the exfiltration of sensitive secrets stored within it. The problem arises because the 'get_swagger_ui_html' function from FastAPI is used without proper encoding or sanitization of user-controlled arguments, allowing for the injection of malicious scripts that can be executed in the context of the user's session.
Impact
Exploitation of this vulnerability allows for a one-click reflected cross-site scripting attack, leading to a takeover of the user's session and access to all secrets stored within it.
Reproduction
To reproduce this vulnerability, first set up the Visionatrix application, for example by using 'docker compose up -d visionatrix_cpu'. Once the application is running, navigate to the '/docs/flows' endpoint and inject a payload that exploits the reflected cross-site scripting vulnerability, such as a script injection that alerts the document domain. This can be done by crafting a query parameter that includes the malicious script, which will be executed in the context of the user's session.
Remediation
Users can update to Visionatrix version 2.5.1, where this vulnerability has been patched.
Vulnerability Rating
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.
