n8n is an open source workflow automation platform. Prior to versions 1.123.12 and 2.4.0, when workflows process uploaded files and transfer them to remote servers via the SSH node without validating their metadata the vulnerability can lead to files being written to unintended locations on those remote systems potentially leading to remote code execution on those systems. As a prerequisites an unauthenticated attacker needs knowledge of such workflows existing and the endpoints for file uploads need to be unauthenticated. This issue has been patched in versions 1.123.12 and 2.4.0.
CVE-2026-25055 is a path traversal vulnerability in n8n workflow automation platform affecting versions before 1.123.12 and 2.4.0. Unauthenticated attackers can exploit unvalidated file metadata in SSH node transfers to write files to arbitrary locations on remote systems, potentially achieving remote code execution. This vulnerability requires knowledge of vulnerable workflows and unauthenticated file upload endpoints, making it a significant risk for organizations using n8n in production environments.
IMMEDIATE ACTIONS:
1. Identify all n8n instances in your environment and document their versions
2. Disable or restrict access to unauthenticated file upload endpoints immediately
3. Review workflow logs for suspicious file transfer activities, particularly SSH node operations
4. Implement network segmentation to limit SSH node access to trusted remote systems only
PATCHING:
1. Upgrade n8n to version 1.123.12 (for v1.x) or 2.4.0 (for v2.x) immediately
2. Test patches in non-production environments first
3. Implement change management procedures for production upgrades
COMPENSATING CONTROLS (if immediate patching not possible):
1. Implement authentication on all file upload endpoints
2. Validate and sanitize file metadata before SSH transfers
3. Implement strict input validation on file paths and names
4. Use SSH key-based authentication with restricted permissions
5. Monitor SSH node activities with detailed logging
DETECTION:
1. Monitor for path traversal patterns in file names (../, ..\, encoded variants)
2. Alert on SSH node operations with unusual file paths
3. Track failed file write attempts to unexpected directories
4. Monitor for unauthenticated access to file upload endpoints
الإجراءات الفورية:
1. حدد جميع مثيلات n8n في بيئتك وقثق إصداراتها
2. عطل أو قيد الوصول إلى نقاط نهاية تحميل الملفات غير المصرحة فوراً
3. راجع سجلات سير العمل للأنشطة المريبة في نقل الملفات، خاصة عمليات عقدة SSH
4. طبق تقسيم الشبكة لتحديد وصول عقدة SSH إلى الأنظمة البعيدة الموثوقة فقط
التصحيح:
1. ترقية n8n إلى الإصدار 1.123.12 (للإصدار v1.x) أو 2.4.0 (للإصدار v2.x) فوراً
2. اختبر التصحيحات في بيئات غير الإنتاج أولاً
3. طبق إجراءات إدارة التغيير لترقيات الإنتاج
الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
1. طبق المصادقة على جميع نقاط نهاية تحميل الملفات
2. تحقق من بيانات وصفية للملفات وقم بتنظيفها قبل نقل SSH
3. طبق التحقق الصارم من المدخلات على مسارات الملفات والأسماء
4. استخدم المصادقة المستندة إلى مفتاح SSH مع أذونات مقيدة
5. راقب أنشطة عقدة SSH بسجل تفصيلي
الكشف:
1. راقب أنماط اجتياز المسار في أسماء الملفات (../, ..\, المتغيرات المشفرة)
2. تنبيه على عمليات عقدة SSH بمسارات ملفات غير عادية
3. تتبع محاولات كتابة الملفات الفاشلة في الدلائل غير المتوقعة
4. راقب الوصول غير المصرح إلى نقاط نهاية تحميل الملفات