A UNIX Symbolic Link (Symlink) Following vulnerability in the CLI of Juniper Networks Junos OS allows a local, authenticated attacker with low privileges to escalate their privileges to root which will lead to a complete compromise of the system.
When after a user has performed a specific 'file link ...' CLI operation, another user commits (unrelated configuration changes), the first user can login as root.
This issue affects Junos OS:
* all versions before 23.2R2-S7,
* 23.4 versions before 23.4R2-S6,
* 24.2 versions before 24.2R2-S3,
* 24.4 versions before 24.4R2-S2,
* 25.2 versions before 25.2R2.
This issue does not affect versions 25.4R1 or later.
A critical privilege escalation vulnerability in Juniper Junos OS CLI allows authenticated local users to gain root access through symlink following during file link operations. This affects multiple Junos versions and requires another user to commit configuration changes to trigger the exploit, enabling complete system compromise. The vulnerability poses significant risk to Saudi organizations operating Juniper network infrastructure, particularly in critical sectors managing sensitive communications and data.
IMMEDIATE ACTIONS:
1. Identify all Juniper Junos OS devices in your environment and document current versions
2. Restrict local CLI access to trusted administrators only; implement principle of least privilege
3. Disable or restrict the 'file link' CLI command if not operationally required
4. Implement strict change management procedures requiring approval before configuration commits
5. Monitor for suspicious file link operations in CLI audit logs
PATCHING GUIDANCE:
1. Upgrade to patched versions immediately: 23.2R2-S7 or later, 23.4R2-S6 or later, 24.2R2-S3 or later, 24.4R2-S2 or later, or 25.2R2 or later
2. Prioritize devices in critical infrastructure (banking, energy, government) for immediate patching
3. Test patches in non-production environments first; coordinate with change management
4. Plan maintenance windows with minimal network impact
COMPENSATING CONTROLS (if immediate patching not possible):
1. Implement strict access controls limiting CLI access to specific administrative accounts
2. Use role-based access control (RBAC) to prevent low-privilege users from executing 'file link' commands
3. Disable local user authentication where possible; enforce centralized authentication (RADIUS/TACACS+)
4. Implement file integrity monitoring on critical system directories
5. Enable comprehensive CLI command auditing and log all file operations
6. Restrict simultaneous user sessions and implement session timeouts
DETECTION RULES:
1. Alert on 'file link' CLI commands executed by non-administrative accounts
2. Monitor for configuration commits immediately following file link operations
3. Track failed privilege escalation attempts in system logs
4. Monitor /tmp and /var/tmp for suspicious symlinks created by unprivileged users
5. Alert on unexpected root process spawning from CLI sessions
6. Implement SIEM rules correlating file link operations with subsequent commits within 5-minute windows
الإجراءات الفورية:
1. حدد جميع أجهزة Juniper Junos OS في بيئتك وقثق الإصدارات الحالية
2. قيد الوصول إلى واجهة سطر الأوامر المحلية للمسؤولين الموثوقين فقط؛ طبق مبدأ أقل امتياز
3. عطل أو قيد أمر CLI 'file link' إذا لم يكن مطلوبًا تشغيليًا
4. طبق إجراءات إدارة تغيير صارمة تتطلب موافقة قبل التزام التكوين
5. راقب العمليات المريبة لربط الملفات في سجلات تدقيق CLI
إرشادات التصحيح:
1. قم بالترقية إلى الإصدارات المصححة فورًا: 23.2R2-S7 أو أحدث، 23.4R2-S6 أو أحدث، 24.2R2-S3 أو أحدث، 24.4R2-S2 أو أحدث، أو 25.2R2 أو أحدث
2. أعط الأولوية للأجهزة في البنية التحتية الحرجة (البنوك والطاقة والحكومة) للتصحيح الفوري
3. اختبر التصحيحات في بيئات غير الإنتاج أولاً؛ تنسيق مع إدارة التغيير
4. خطط نوافذ الصيانة بأقل تأثير على الشبكة
الضوابط التعويضية (إذا لم يكن التصحيح الفوري ممكنًا):
1. طبق ضوابط وصول صارمة تقيد الوصول إلى CLI بحسابات إدارية محددة
2. استخدم التحكم في الوصول القائم على الأدوار (RBAC) لمنع المستخدمين ذوي الامتيازات المنخفضة من تنفيذ أوامر 'file link'
3. عطل المصادقة المحلية للمستخدم حيث أمكن؛ فرض المصادقة المركزية (RADIUS/TACACS+)
4. طبق مراقبة سلامة الملفات على الدلائل الحرجة للنظام
5. فعّل تدقيق أوامر CLI الشامل وسجل جميع عمليات الملفات
6. قيد جلسات المستخدمين المتزامنة وطبق انتهاء صلاحية الجلسة
قواعد الكشف:
1. تنبيه على أوامر CLI 'file link' التي ينفذها حسابات غير إدارية
2. راقب التزامات التكوين فورًا بعد عمليات ربط الملفات
3. تتبع محاولات تصعيد الامتيازات الفاشلة في سجلات النظام
4. راقب /tmp و /var/tmp للروابط الرمزية المريبة التي أنشأها المستخدمون غير المميزون
5. تنبيه على عمليات الجذر غير المتوقعة التي تنبثق من جلسات CLI
6. طبق قواعس SIEM ترتبط عمليات ربط الملفات بالالتزامات اللاحقة في نوافذ 5 دقائق