Synopsis
Flowise uses the Flowise Chat Embed JavaScript library to display Flowise chatbot on a website. Flowise Chat Embed versions prior 2.0.0 suffer from a lack of sanitization of user inputs, allowing a remote and unauthenticated user to inject malicious JavaScript and perform Stored Cross-Site scripting attacks against the vulnerable instance.
Proof-of-Concept
Flowise's core features include the creation of chatflow, which could be translated as the creation of a chatbot that can then be embedded in a website.
When creating a flow, by starting a conversation with the bot we observed that certain HTML attributes are filtered, such as on* events.
It is however possible to use an XSS payload without an event handler, such as :
<iframe src=javascript:console.log(document.domain)>As the chatbot is designed to be embedded on a website, the payload will then flow to the Flowise administration panel and being executed, allowing a random user starting a conversation with the chatbot to achieve the attack :
Solution
Upgrade to Flowise 2.1.1 or later. If using Flowise Chat Embed library only, upgrade to version 2.0.0 or later.
Additional References
https://github.com/FlowiseAI/Flowise/releases/tag/flowise%402.1.1https://github.com/FlowiseAI/FlowiseChatEmbed/releases/tag/flowise-embed%402.0.0
Disclosure Timeline
All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.
Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.
For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.
If you have questions or corrections about this advisory, please email [email protected]