CVE-2026-129449: DrayTek Vigor2960 mainfunction.cgi swmconfigupload OS Command Injection
DrayTek Vigor2960 dual-WAN enterprise routers running firmware 1.5.1.6 or earlier are vulnerable to a critical OS command injection (CVE-2026-129449, CVSS 9.9) in the management CGI handler '/cgi-bin/mainfunction.cgi'. By manipulating the 'swmconfigupload' parameter handled by function 'sub_14914', attackers with low-privilege management access (or chained session bypasses) can execute arbitrary shell commands as root on the underlying Linux system. Compromise of a perimeter DrayTek router exposes corporate VPN tunnels, DNS traffic, and internal LAN segments to interception and ransomware pivoting. Upgrade immediately to firmware 1.5.1.7 or later and restrict WAN management access.
HERMES THREAT SCORE & ENTERPRISE RISK EVALUATION
Target:DrayTek Vigor2960 Perimeter Router (/cgi-bin/mainfunction.cgi) CVSS v3.1 rates CVE-2026-129449 at 9.9 (Critical). Hermes assigns HTS 96 (CRITICAL) reflecting the high prevalence of Internet-exposed DrayTek Vigor perimeter routers in SMB and enterprise branch offices, which are routinely targeted by botnets and ransomware initial access brokers.
1. Executive Summary & Operational Context
Section titled โ1. Executive Summary & Operational ContextโCVE-2026-129449 (CVSS v3.1 9.9 Critical, Hermes Threat Score 96 / CRITICAL) is a critical operating system command injection vulnerability affecting DrayTek Vigor2960 series routers running firmware 1.5.1.6 and earlier. Disclosed on November 15, 2026, the flaw resides in the web management CGI binary /cgi-bin/mainfunction.cgi within function sub_14914.
DrayTek Vigor routers serve as primary perimeter gateways and IPSec/SSL VPN concentrators for thousands of branch offices and small-to-medium enterprises. Because the vulnerability carries a Scope: Changed (S:C) rating, successful exploitation compromises not only the router operating system itself, but also downstream internal networks, VPN tunnels, and connected endpoints.
2. Technical Vulnerability Analysis & Root Cause
Section titled โ2. Technical Vulnerability Analysis & Root CauseโThe vulnerability is rooted in unsafe string interpolation inside the embedded lighttpd CGI handler /cgi-bin/mainfunction.cgi:
- Vulnerable Component: Function
sub_14914inside/cgi-bin/mainfunction.cgi. - Entry Point: HTTP
POST(or crafted query) requests targeting theswmconfiguploadparameter (used for switch/configuration upload workflows). - Root Cause (
CWE-78/CWE-77):sub_14914extracts user-controlled input fromswmconfiguploadand concatenates it directly into a shell command string passed tosystem()orpopen()without escaping shell metacharacters (;,|,&,$(), or backticks). - Execution Context: Because the embedded web/CGI stack on DrayTek Vigor2960 runs with
rootprivileges, injected commands execute immediately asuid=0(root), granting full read/write access to flash configuration, VPN pre-shared keys, routing tables, and packet capture utilities.
3. Attack Execution Flow & Weaponization Mechanics
Section titled โ3. Attack Execution Flow & Weaponization MechanicsโsequenceDiagram autonumber participant Attacker as Remote Attacker participant WebUI as DrayTek Vigor2960 (/cgi-bin/mainfunction.cgi) participant Handler as sub_14914 (swmconfigupload) participant Shell as /bin/sh (uid=0 root)
Attacker->>WebUI: Authenticated HTTP request with crafted swmconfigupload payload WebUI->>Handler: Pass swmconfigupload string to sub_14914 Note over Handler: No sanitization of ; | $() or backticks Handler->>Shell: system("... " + swmconfigupload) Shell-->>Attacker: Root command execution / reverse shell / VPN key theft4. Forensic Signatures, Detection Queries & IOCs
Section titled โ4. Forensic Signatures, Detection Queries & IOCsโSecurity teams should inspect perimeter WAF/proxy logs and router syslogs for anomalous calls to mainfunction.cgi:
- Target URI:
/cgi-bin/mainfunction.cgi - Parameter:
swmconfiguploadcontaining shell metacharacters (;,|,&,$(,`) or URL-encoded equivalents (%3B,%7C,%24%28). - Post-Exploitation Behavior: Outbound
wget,curl, ortftpconnections initiated from the router WAN IP to fetch MIPS/ARM botnet binaries or establish reverse shells.
alert http $EXTERNAL_NET any -> $HOME_NET any ( msg:"HERMES DrayTek Vigor2960 CVE-2026-129449 swmconfigupload Command Injection Attempt"; flow:established,to_server; http.uri; content:"/cgi-bin/mainfunction.cgi"; nocase; http.request_body; content:"swmconfigupload="; nocase; pcre:"/swmconfigupload=[^&]*(%3b|%7c|%26|%60|%24%28|[;|&`$])/i"; classtype:attempted-admin; sid:2026129449; rev:1;)185.196.220[.]7145.86.208[.]112
5. Comprehensive Remediation, Hardening & Mitigation Plan
Section titled โ5. Comprehensive Remediation, Hardening & Mitigation Planโ- Upgrade Firmware Immediately:
Update all DrayTek Vigor2960 appliances to firmware version 1.5.1.7 or later, which sanitizes
swmconfiguploadand eliminates unsafe shell invocation insub_14914. - Disable WAN Management Exposure: Navigate to System Maintenance -> Access Control and disable HTTP/HTTPS/SSH/Telnet management from the WAN interface. Require administrators to connect via IPSec/WireGuard management VPN or dedicated out-of-band management VLANs.
- Rotate Credentials & VPN Secrets: If the management interface was exposed to the Internet prior to patching, assume compromise: rotate all router admin passwords, IPSec pre-shared keys, SSL VPN certificates, and RADIUS/LDAP bind credentials.
- Audit Router Configuration & Persistence: Export and inspect the router configuration for unauthorized static routes, rogue port-forwarding rules, modified DNS forwarders, or unknown VPN user accounts.