Skip to content

CVE-2026-129449: DrayTek Vigor2960 mainfunction.cgi swmconfigupload OS Command Injection

Density:
C-Level Executive Briefing CVE-2026-129449 CRITICAL SCORE 96/100

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

HERMES THREAT SCORE & ENTERPRISE RISK EVALUATION

Target: DrayTek Vigor2960 Perimeter Router (/cgi-bin/mainfunction.cgi)
Confidence: 96%
96 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 19 / 20
Threat Activity 18 / 20
Weaponization 19 / 20
Exposure 20 / 20
Prevalence 19 / 20
Impact 20 / 20
Exploit Maturity 18 / 20
Attack Chain Potential 20 / 20
โš–๏ธ Divergence & Operational Rationale

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.


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.


The vulnerability is rooted in unsafe string interpolation inside the embedded lighttpd CGI handler /cgi-bin/mainfunction.cgi:

  • Vulnerable Component: Function sub_14914 inside /cgi-bin/mainfunction.cgi.
  • Entry Point: HTTP POST (or crafted query) requests targeting the swmconfigupload parameter (used for switch/configuration upload workflows).
  • Root Cause (CWE-78 / CWE-77): sub_14914 extracts user-controlled input from swmconfigupload and concatenates it directly into a shell command string passed to system() or popen() without escaping shell metacharacters (;, |, &, $(), or backticks).
  • Execution Context: Because the embedded web/CGI stack on DrayTek Vigor2960 runs with root privileges, injected commands execute immediately as uid=0(root), granting full read/write access to flash configuration, VPN pre-shared keys, routing tables, and packet capture utilities.

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 theft

Security teams should inspect perimeter WAF/proxy logs and router syslogs for anomalous calls to mainfunction.cgi:

  • Target URI: /cgi-bin/mainfunction.cgi
  • Parameter: swmconfigupload containing shell metacharacters (;, |, &, $(, `) or URL-encoded equivalents (%3B, %7C, %24%28).
  • Post-Exploitation Behavior: Outbound wget, curl, or tftp connections initiated from the router WAN IP to fetch MIPS/ARM botnet binaries or establish reverse shells.

  1. Upgrade Firmware Immediately: Update all DrayTek Vigor2960 appliances to firmware version 1.5.1.7 or later, which sanitizes swmconfigupload and eliminates unsafe shell invocation in sub_14914.
  2. 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.
  3. 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.
  4. 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.