n8n is an open source workflow automation platform. Prior to versions 1.123.32, 2.17.4, and 2.18.1, the fix for GHSA-f3f2-mcxc-pwjx did not cover the Snowflake node or the legacy MySQL v1 node. Both nodes construct SQL queries by directly interpolating user-controlled table names, column names, and update keys into query strings without identifier escaping, enabling SQL injection against the connected database. This issue has been patched in versions 1.123.32, 2.17.4, and 2.18.1.
CVE-2026-42237 is a critical SQL injection vulnerability in n8n workflow automation platform affecting Snowflake and legacy MySQL v1 nodes. The vulnerability allows attackers to inject malicious SQL commands through unescaped table names, column names, and update keys, potentially leading to unauthorized database access, data exfiltration, or manipulation. Organizations using n8n for workflow automation connected to production databases face immediate risk of data compromise.
IMMEDIATE ACTIONS:
1. Identify all n8n instances in your environment and document their version numbers
2. Audit all n8n workflows using Snowflake nodes or legacy MySQL v1 nodes
3. Review database access logs for suspicious SQL queries or unusual activity
4. Restrict network access to n8n instances to authorized users only
5. Implement database activity monitoring on connected Snowflake and MySQL instances
PATCHING GUIDANCE:
1. Upgrade n8n to version 1.123.32, 2.17.4, or 2.18.1 or later immediately
2. Test patches in non-production environments first
3. Schedule maintenance windows for production upgrades
4. Verify all workflows function correctly after patching
COMPENSATING CONTROLS (if immediate patching not possible):
1. Disable or remove all Snowflake and MySQL v1 nodes from active workflows
2. Implement database-level access controls restricting n8n service accounts to minimal required permissions
3. Use database views with restricted column access instead of direct table access
4. Implement SQL query whitelisting at the database level
5. Enable comprehensive database audit logging for all n8n-initiated queries
DETECTION RULES:
1. Monitor for SQL syntax errors in database logs from n8n connections
2. Alert on unusual SQL patterns: UNION, SELECT INTO, DROP, ALTER from n8n service accounts
3. Track failed authentication attempts to connected databases
4. Monitor for unexpected table/column access patterns
5. Implement IDS/IPS rules for SQL injection payloads in application traffic
الإجراءات الفورية:
1. حدد جميع مثيلات n8n في بيئتك وقم بتوثيق أرقام إصداراتها
2. قم بمراجعة جميع سير عمل n8n التي تستخدم عقد Snowflake أو عقد MySQL v1 القديمة
3. راجع سجلات الوصول إلى قاعدة البيانات للبحث عن استعلامات SQL مريبة أو نشاط غير عادي
4. قيد الوصول إلى شبكة مثيلات n8n للمستخدمين المصرح لهم فقط
5. طبق مراقبة نشاط قاعدة البيانات على مثيلات Snowflake و MySQL المتصلة
إرشادات التصحيح:
1. قم بترقية n8n إلى الإصدار 1.123.32 أو 2.17.4 أو 2.18.1 أو أحدث على الفور
2. اختبر التصحيحات في بيئات غير الإنتاج أولاً
3. جدول نوافذ الصيانة لترقيات الإنتاج
4. تحقق من أن جميع سير العمل تعمل بشكل صحيح بعد التصحيح
الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
1. عطل أو أزل جميع عقد Snowflake و MySQL v1 من سير العمل النشط
2. طبق ضوابط الوصول على مستوى قاعدة البيانات التي تقيد حسابات خدمة n8n بأقل الأذونات المطلوبة
3. استخدم طرق عرض قاعدة البيانات مع الوصول المقيد للأعمدة بدلاً من الوصول المباشر إلى الجدول
4. طبق قائمة بيضاء لاستعلامات SQL على مستوى قاعدة البيانات
5. فعّل تسجيل التدقيق الشامل لجميع الاستعلامات التي يبدأها n8n
قواعد الكشف:
1. راقب أخطاء بناء جملة SQL في سجلات قاعدة البيانات من اتصالات n8n
2. تنبيه على أنماط SQL غير العادية: UNION و SELECT INTO و DROP و ALTER من حسابات خدمة n8n
3. تتبع محاولات المصادقة الفاشلة لقواعد البيانات المتصلة
4. راقب أنماط الوصول غير المتوقعة للجدول/العمود
5. طبق قواعس IDS/IPS لحمولات حقن SQL في حركة المرور التطبيقية