n8n is an open source workflow automation platform. Prior to versions 1.123.32, 2.17.4, and 2.18.1, an authenticated user with permission to create or modify workflows could achieve global prototype pollution via the XML Node leading to RCE when combined with other nodes exploiting the prototype pollution. This issue has been patched in versions 1.123.32, 2.17.4, and 2.18.1.
CVE-2026-42232 is a critical prototype pollution vulnerability in n8n workflow automation platform affecting versions prior to 1.123.32, 2.17.4, and 2.18.1. Authenticated users with workflow creation/modification permissions can exploit the XML Node to achieve global prototype pollution, potentially leading to Remote Code Execution (RCE) when combined with other nodes. This poses significant risk to Saudi organizations using n8n for critical automation workflows, particularly in financial and government sectors.
IMMEDIATE ACTIONS:
1. Audit all n8n instances in your environment and identify current versions
2. Restrict workflow creation/modification permissions to trusted administrators only
3. Implement network segmentation to isolate n8n instances from critical systems
4. Monitor n8n logs for suspicious workflow modifications and XML Node usage
5. Disable XML Node functionality if not actively required
PATCHING GUIDANCE:
1. Upgrade to patched versions: 1.123.32, 2.17.4, or 2.18.1 immediately
2. Test patches in non-production environments first
3. Plan maintenance windows for production upgrades
4. Verify workflow functionality post-upgrade
COMPENSATING CONTROLS (if immediate patching not possible):
1. Implement strict RBAC limiting workflow modification to essential personnel
2. Enable audit logging for all workflow changes
3. Use Web Application Firewall (WAF) rules to detect prototype pollution patterns
4. Implement API rate limiting and request validation
5. Deploy runtime application self-protection (RASP) if available
DETECTION RULES:
1. Monitor for XML Node usage in workflow definitions
2. Alert on workflow modifications by non-admin accounts
3. Track prototype pollution indicators: __proto__, constructor, prototype in request payloads
4. Monitor n8n process execution for unexpected child processes
5. Log all API calls to workflow creation/modification endpoints
الإجراءات الفورية:
1. تدقيق جميع مثيلات n8n في بيئتك وتحديد الإصدارات الحالية
2. تقييد أذونات إنشاء/تعديل سير العمل للمسؤولين الموثوقين فقط
3. تنفيذ تقسيم الشبكة لعزل مثيلات n8n عن الأنظمة الحرجة
4. مراقبة سجلات n8n للتعديلات المريبة على سير العمل واستخدام عقدة XML
5. تعطيل وظيفة عقدة XML إذا لم تكن مطلوبة بنشاط
إرشادات التصحيح:
1. الترقية إلى الإصدارات المصححة: 1.123.32 أو 2.17.4 أو 2.18.1 فوراً
2. اختبار التصحيحات في بيئات غير الإنتاج أولاً
3. التخطيط لنوافذ الصيانة لترقيات الإنتاج
4. التحقق من وظيفة سير العمل بعد الترقية
الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
1. تنفيذ RBAC صارم يقيد تعديل سير العمل للموظفين الأساسيين
2. تفعيل تسجيل التدقيق لجميع تغييرات سير العمل
3. استخدام قواعد جدار الحماية (WAF) للكشف عن أنماط تلويث النموذج الأولي
4. تنفيذ تحديد معدل API والتحقق من الطلبات
5. نشر حماية التطبيق الذاتية في وقت التشغيل (RASP) إن أمكن
قواعد الكشف:
1. مراقبة استخدام عقدة XML في تعريفات سير العمل
2. التنبيه على تعديلات سير العمل من قبل حسابات غير إدارية
3. تتبع مؤشرات تلويث النموذج الأولي: __proto__ و constructor و prototype في حمولات الطلب
4. مراقبة تنفيذ عملية n8n للعمليات الفرعية غير المتوقعة
5. تسجيل جميع استدعاءات API لنقاط نهاية إنشاء/تعديل سير العمل