rConfig OS Command Injection Vulnerability — rConfig lib/ajaxHandlers/ajaxAddTemplate.php contains an OS command injection vulnerability that allows remote attackers to execute OS commands via shell metacharacters in the fileName POST parameter.
CVE-2020-10221 is a critical OS command injection vulnerability in rConfig, a widely-used network device configuration management tool, scoring 9.0 on the CVSS scale. The vulnerability exists in lib/ajaxHandlers/ajaxAddTemplate.php, allowing remote attackers to inject and execute arbitrary OS commands via shell metacharacters in the fileName POST parameter. A public exploit is available, making this vulnerability actively exploitable with low technical barrier. Organizations using rConfig for network device management are at immediate risk of full system compromise, lateral movement, and data exfiltration.
IMMEDIATE ACTIONS:
1. Identify all instances of rConfig deployed across the environment using asset inventory tools.
2. Immediately restrict network access to rConfig interfaces using firewall rules — allow only trusted management IP ranges.
3. Take rConfig instances offline if not immediately patchable.
4. Review web server and OS logs for evidence of exploitation — look for unusual POST requests to ajaxAddTemplate.php with shell metacharacters (;, |, &, $, `, etc.).
PATCHING GUIDANCE:
5. Apply the latest available patch from the rConfig official repository immediately.
6. Upgrade to a patched version of rConfig that sanitizes the fileName POST parameter.
7. Verify patch integrity before deployment.
COMPENSATING CONTROLS (if patch unavailable):
8. Deploy a Web Application Firewall (WAF) rule to block requests containing shell metacharacters in POST parameters targeting ajaxAddTemplate.php.
9. Implement strict input validation at the application layer.
10. Run rConfig under a least-privilege service account to limit command execution impact.
11. Enable SELinux or AppArmor to restrict process capabilities.
DETECTION RULES:
12. SIEM alert: Monitor POST requests to /lib/ajaxHandlers/ajaxAddTemplate.php containing characters: ; | & $ ` > < \
13. Monitor for unexpected child processes spawned by the web server process (e.g., Apache/Nginx spawning bash or sh).
14. Alert on unusual outbound network connections from the rConfig server.
15. Deploy IDS/IPS signatures for CVE-2020-10221 exploitation attempts.
الإجراءات الفورية:
1. تحديد جميع نسخ rConfig المنتشرة في البيئة باستخدام أدوات جرد الأصول.
2. تقييد الوصول الشبكي فوراً لواجهات rConfig باستخدام قواعد جدار الحماية — السماح فقط لنطاقات IP الإدارية الموثوقة.
3. إيقاف تشغيل نسخ rConfig إذا تعذر تطبيق التحديث فوراً.
4. مراجعة سجلات خادم الويب ونظام التشغيل للكشف عن أدلة الاستغلال — البحث عن طلبات POST غير معتادة لملف ajaxAddTemplate.php تحتوي على أحرف خاصة.
إرشادات التحديث:
5. تطبيق أحدث تحديث متاح من المستودع الرسمي لـ rConfig فوراً.
6. الترقية إلى إصدار مُصحَّح من rConfig يُعقِّم معامل fileName في طلبات POST.
7. التحقق من سلامة التحديث قبل النشر.
ضوابط التعويض (إذا لم يتوفر التحديث):
8. نشر قاعدة جدار حماية تطبيقات الويب (WAF) لحجب الطلبات التي تحتوي على أحرف خاصة في معاملات POST الموجهة لـ ajaxAddTemplate.php.
9. تطبيق التحقق الصارم من المدخلات على مستوى التطبيق.
10. تشغيل rConfig تحت حساب خدمة بأقل صلاحيات ممكنة للحد من تأثير تنفيذ الأوامر.
11. تفعيل SELinux أو AppArmor لتقييد صلاحيات العمليات.
قواعد الكشف:
12. تنبيه SIEM: مراقبة طلبات POST الموجهة لـ /lib/ajaxHandlers/ajaxAddTemplate.php التي تحتوي على الأحرف: ; | & $ ` > < \
13. مراقبة العمليات الفرعية غير المتوقعة التي يُنشئها خادم الويب.
14. التنبيه على الاتصالات الصادرة غير المعتادة من خادم rConfig.
15. نشر توقيعات IDS/IPS لمحاولات استغلال CVE-2020-10221.