CVE-2024-36423
📋 TL;DR
Flowise version 1.4.3 has a reflected cross-site scripting vulnerability in the /api/v1/public-chatflows/id endpoint that allows attackers to inject malicious JavaScript via crafted URLs. This can lead to session hijacking, data theft, or file reading when chained with path injection. Organizations using Flowise with default unauthenticated configurations are affected.
💻 Affected Systems
- Flowise
📦 What is this software?
Flowise by Flowiseai
⚠️ Risk & Real-World Impact
Worst Case
Attackers steal sensitive data, read arbitrary files from the server, and compromise user sessions through malicious redirects or popups.
Likely Case
Session hijacking and data exfiltration from users who click malicious links, potentially leading to credential theft.
If Mitigated
Limited impact with proper input validation, output encoding, and authentication enabled.
🎯 Exploit Status
Exploitation requires crafting malicious URLs but is straightforward with default settings.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Not available
Vendor Advisory: Not available
Restart Required: No
Instructions:
No official patch available. Monitor Flowise GitHub repository for updates.
🔧 Temporary Workarounds
Enable Authentication
allConfigure Flowise to require authentication, preventing unauthenticated access to vulnerable endpoints.
Configure authentication in Flowise settings (specific commands depend on deployment method)
Input Validation and Output Encoding
allImplement server-side validation of chatflow IDs and encode outputs to prevent script injection.
Modify server code to sanitize input and encode output in the affected endpoint
🧯 If You Can't Patch
- Restrict network access to Flowise instances to trusted users only.
- Implement a web application firewall (WAF) with XSS protection rules.
🔍 How to Verify
Check if Vulnerable:
Test by accessing /api/v1/public-chatflows/<script>alert('XSS')</script> and checking if script executes in 404 page.
Check Version:
Check Flowise version in package.json or via application interface.
Verify Fix Applied:
Verify that malicious input in the chatflow ID parameter is properly sanitized and does not execute.
📡 Detection & Monitoring
Log Indicators:
- Unusual requests to /api/v1/public-chatflows/ with script-like patterns in parameters
Network Indicators:
- HTTP 404 responses containing reflected user input with script tags
SIEM Query:
source="flowise" AND url="/api/v1/public-chatflows/*" AND (status=404 OR contains(input, "<script>"))
🔗 References
- https://github.com/FlowiseAI/Flowise/blob/flowise-ui%401.4.0/packages/server/src/index.ts#L322-L322
- https://securitylab.github.com/advisories/GHSL-2023-232_GHSL-2023-234_Flowise/
- https://github.com/FlowiseAI/Flowise/blob/flowise-ui%401.4.0/packages/server/src/index.ts#L322-L322
- https://securitylab.github.com/advisories/GHSL-2023-232_GHSL-2023-234_Flowise/