DrayTek Multiple Vigor Routers OS Command Injection Vulnerability — DrayTek Vigor3900, Vigor2960, and Vigor300B devices contain an OS command injection vulnerability in cgi-bin/mainfunction.cgi/cvmcfgupload that allows for remote code execution via shell metacharacters in a filename when the text/x-python-script content type is used.
CVE-2020-15415 is a critical OS command injection vulnerability (CVSS 9.0) affecting DrayTek Vigor3900, Vigor2960, and Vigor300B routers, allowing unauthenticated remote code execution via shell metacharacters in a crafted filename through the cgi-bin/mainfunction.cgi/cvmcfgupload endpoint. A public exploit is available, significantly elevating the risk of active exploitation in the wild. Successful exploitation grants full device compromise, enabling network pivoting, traffic interception, and persistent backdoor installation. Organizations relying on these routers for perimeter security or branch connectivity face immediate and severe risk.
IMMEDIATE ACTIONS (within 24 hours):
1. Identify all DrayTek Vigor3900, Vigor2960, and Vigor300B devices in your environment using asset inventory or network scanning tools (nmap, Shodan internal queries).
2. Immediately restrict external/internet access to the management interface (port 443/80) using upstream firewall ACLs.
3. Disable remote management features on affected devices if not operationally required.
4. Check device logs for suspicious POST requests to /cgi-bin/mainfunction.cgi/cvmcfgupload with text/x-python-script content type.
PATCHING GUIDANCE:
5. Apply DrayTek firmware updates: Vigor3900 firmware v1.5.1 or later, Vigor2960 firmware v1.5.1 or later, Vigor300B firmware v1.5.1 or later — available from DrayTek official support portal.
6. Verify firmware integrity using checksums provided by DrayTek before deployment.
7. Schedule patching during maintenance windows with rollback plans in place.
COMPENSATING CONTROLS (if patching is delayed):
8. Deploy a WAF or reverse proxy in front of management interfaces to block requests containing shell metacharacters (;, |, &, $, `, >, <) in filename parameters.
9. Implement network segmentation to isolate affected routers from critical internal systems.
10. Enable IDS/IPS signatures for CVE-2020-15415 exploitation attempts on perimeter security devices.
11. Enforce allowlisting of management interface access by source IP.
DETECTION RULES:
12. SIEM alert: Monitor HTTP POST to URI containing 'cvmcfgupload' with Content-Type 'text/x-python-script'.
13. Network IDS Snort/Suricata rule: alert tcp any any -> $ROUTER_IPS [80,443] (msg:"CVE-2020-15415 DrayTek RCE Attempt"; content:"cvmcfgupload"; content:"x-python-script"; sid:2020154150; rev:1;).
14. Monitor for unexpected outbound connections from router management IPs post-exploitation.
الإجراءات الفورية (خلال 24 ساعة):
1. تحديد جميع أجهزة DrayTek Vigor3900 وVigor2960 وVigor300B في بيئتك باستخدام أدوات جرد الأصول أو فحص الشبكة.
2. تقييد الوصول الخارجي/الإنترنت فوراً إلى واجهة الإدارة (المنفذ 443/80) باستخدام قوائم التحكم في الوصول على جدار الحماية الأمامي.
3. تعطيل ميزات الإدارة عن بُعد على الأجهزة المتأثرة إذا لم تكن ضرورية تشغيلياً.
4. فحص سجلات الجهاز بحثاً عن طلبات POST مشبوهة إلى /cgi-bin/mainfunction.cgi/cvmcfgupload بنوع محتوى text/x-python-script.
إرشادات التصحيح:
5. تطبيق تحديثات البرامج الثابتة من DrayTek: Vigor3900 الإصدار v1.5.1 أو أحدث، Vigor2960 الإصدار v1.5.1 أو أحدث، Vigor300B الإصدار v1.5.1 أو أحدث — متاحة من بوابة دعم DrayTek الرسمية.
6. التحقق من سلامة البرامج الثابتة باستخدام المجاميع الاختبارية التي يوفرها DrayTek قبل النشر.
7. جدولة التصحيح خلال نوافذ الصيانة مع وضع خطط التراجع.
ضوابط التعويض (في حالة تأخر التصحيح):
8. نشر جدار حماية تطبيقات الويب أو وكيل عكسي أمام واجهات الإدارة لحظر الطلبات التي تحتوي على محارف خاصة في معاملات اسم الملف.
9. تطبيق تجزئة الشبكة لعزل الأجهزة المتأثرة عن الأنظمة الداخلية الحيوية.
10. تفعيل توقيعات IDS/IPS لمحاولات استغلال CVE-2020-15415 على أجهزة أمن المحيط.
11. تطبيق القائمة البيضاء لوصول واجهة الإدارة حسب عنوان IP المصدر.
قواعد الكشف:
12. تنبيه SIEM: مراقبة HTTP POST إلى URI يحتوي على 'cvmcfgupload' بنوع المحتوى 'text/x-python-script'.
13. قاعدة IDS للشبكة Snort/Suricata: تنبيه على الطلبات التي تحتوي على 'cvmcfgupload' و'x-python-script' معاً.
14. مراقبة الاتصالات الصادرة غير المتوقعة من عناوين IP لإدارة الموجه بعد الاستغلال.