Flowise is a drag & drop user interface to build a customized large language model flow. Prior to 3.1.0, The CSVAgent allows providing a custom Pandas CSV read code. Due to lack of sanitization, an attacker can provide a command injection payload that will get interpolated and executed by the server. This vulnerability is fixed in 3.1.0.
Flowise versions prior to 3.1.0 contain a critical code injection vulnerability in the CSVAgent component that allows unauthenticated attackers to execute arbitrary commands on the server through unsanitized Pandas CSV read code. The vulnerability has a CVSS score of 8.8 and active exploits are available. Organizations using Flowise for LLM workflow automation face immediate risk of complete system compromise.
IMMEDIATE ACTIONS:
1. Identify all Flowise instances in your environment and document versions (check deployment logs, container registries, and application inventories)
2. Isolate affected Flowise instances from production networks or disable CSVAgent functionality immediately
3. Review access logs for suspicious CSV upload activities or unusual command patterns in the past 30 days
4. Implement network segmentation to restrict Flowise server outbound connections
PATCHING GUIDANCE:
1. Upgrade to Flowise 3.1.0 or later immediately when available
2. If upgrade is not immediately possible, disable the CSVAgent component entirely in configuration files
3. Implement input validation: reject any CSV read code containing shell metacharacters (;, |, &, $, `, >, <, newlines)
4. Apply principle of least privilege: run Flowise processes with minimal required permissions (non-root user)
COMPENSATING CONTROLS:
1. Deploy Web Application Firewall (WAF) rules to block requests containing command injection patterns to Flowise endpoints
2. Implement strict file upload restrictions: whitelist only .csv extensions and validate MIME types
3. Monitor Flowise process execution with EDR/XDR solutions for unexpected child process spawning
4. Enable comprehensive audit logging for all CSV upload and processing activities
5. Implement network-level monitoring for unusual outbound connections from Flowise servers
DETECTION RULES:
1. Alert on Flowise processes spawning shell interpreters (bash, sh, cmd.exe, powershell)
2. Monitor for CSV upload requests containing: $(command), `command`, backticks, pipe operators, semicolons in payload
3. Track failed and successful authentication attempts to Flowise API endpoints
4. Flag any Flowise process reading sensitive files (/etc/passwd, /etc/shadow, Windows registry)
5. Alert on unexpected network connections from Flowise to external IP addresses
الإجراءات الفورية:
1. حدد جميع مثيلات Flowise في بيئتك وتوثيق الإصدارات (تحقق من سجلات النشر والسجلات والمستودعات)
2. عزل مثيلات Flowise المتأثرة عن شبكات الإنتاج أو تعطيل وظيفة CSVAgent فوراً
3. راجع سجلات الوصول للأنشطة المريبة لتحميل CSV أو أنماط الأوامر غير العادية في آخر 30 يوماً
4. تطبيق تقسيم الشبكة لتقييد اتصالات خادم Flowise الصادرة
إرشادات التصحيح:
1. قم بالترقية إلى Flowise 3.1.0 أو إصدار أحدث فوراً عند توفره
2. إذا لم يكن الترقية ممكنة فوراً، قم بتعطيل مكون CSVAgent بالكامل في ملفات التكوين
3. تطبيق التحقق من الإدخال: رفض أي كود قراءة CSV يحتوي على أحرف shell خاصة (;, |, &, $, `, >, <)
4. تطبيق مبدأ أقل امتياز: تشغيل عمليات Flowise بأقل صلاحيات مطلوبة
الضوابط التعويضية:
1. نشر قواعد جدار حماية تطبيقات الويب لحجب الطلبات التي تحتوي على أنماط حقن الأوامر
2. تطبيق قيود صارمة على تحميل الملفات: السماح فقط بملفات .csv والتحقق من أنواع MIME
3. مراقبة تنفيذ عمليات Flowise باستخدام حلول EDR/XDR للعمليات الفرعية غير المتوقعة
4. تفعيل تسجيل التدقيق الشامل لجميع أنشطة تحميل ومعالجة CSV
5. تطبيق المراقبة على مستوى الشبكة للاتصالات الصادرة غير العادية
قواعد الكشف:
1. تنبيه عند عمليات Flowise التي تولد محاكيات shell
2. مراقبة طلبات تحميل CSV التي تحتوي على أنماط حقن الأوامر
3. تتبع محاولات المصادقة الفاشلة والناجحة على نقاط نهاية API
4. تحديد أي عملية Flowise تقرأ ملفات حساسة
5. تنبيه الاتصالات الشبكية غير المتوقعة من Flowise