Overview
The vulnerability resides in the CGI handling code of DrayTek Vigor2960 routers. The sub_14914 routine fails to properly sanitize the swmconfigupload argument, enabling an attacker to inject shell commands that are executed with the privileges of the web service process. The issue is reachable over the network without authentication.
Technical details
The flaw is a classic command injection. When the mainfunction.cgi script processes a request containing the swmconfigupload parameter, the supplied value is concatenated into a system call without validation. An attacker who can send an HTTP request to the CGI endpoint can supply malicious payload such as '; <command>' to run arbitrary commands on the device. The vulnerability exists in firmware versions up to 1.5.1.6 and is exploitable remotely.
Impact
Successful exploitation gives the attacker full command-line control of the compromised router, allowing data exfiltration, network pivoting, alteration of firewall rules, or deployment of additional malware. All deployments of DrayTek Vigor2960 running firmware 1.5.1.6 or earlier are at risk.
Recommended actions
- Upgrade the device to firmware version 1.5.1.7 or later.
- Restrict network access to the /cgi-bin/mainfunction.cgi endpoint to trusted hosts.
- Monitor web server logs for unexpected swmconfigupload requests.
- Disable the vulnerable CGI function if it is not required.
Detection
Review access logs of the web interface for HTTP requests to /cgi-bin/mainfunction.cgi that contain the swmconfigupload parameter, especially those with unusual characters or command separators. Correlate with any spikes in system process activity or unauthorized configuration changes. Enable alerting on anomalous CGI activity to detect potential exploitation attempts.
Reference: NVD entry for CVE-2026-129449