/

CVE-2026-113389

Severity:

CRITICAL RISK

(9.9)

OS Command Injection (CWE-77) in DrayTek Vigor2960

CVE-2026-113389

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-74, CWE-77

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.9)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A critical command injection vulnerability in the DrayTek Vigor2960 CGI process allows attacker-controlled input in the sectiontype argument to influence operating-system command execution.

The issue may be exploitable remotely through the affected CGI endpoint, potentially allowing an attacker to execute commands with the privileges of the web or CGI service.

A critical command injection vulnerability in the DrayTek Vigor2960 CGI process allows attacker-controlled input in the sectiontype argument to influence operating-system command execution.

The issue may be exploitable remotely through the affected CGI endpoint, potentially allowing an attacker to execute commands with the privileges of the web or CGI service.

Affected context

The vulnerability occurs in the set_table function of /cgi-bin/mainfunction.cgi on affected Vigor2960 firmware. It becomes risky when the CGI process accepts externally supplied sectiontype data and incorporates it into command execution without adequately separating data from shell syntax. The affected product is also identified as end-of-support, which may limit the availability and scope of maintenance.

The vulnerability occurs in the set_table function of /cgi-bin/mainfunction.cgi on affected Vigor2960 firmware. It becomes risky when the CGI process accepts externally supplied sectiontype data and incorporates it into command execution without adequately separating data from shell syntax. The affected product is also identified as end-of-support, which may limit the availability and scope of maintenance.

Exploit preconditions

  • Attack surface: The Vigor2960 CGI/web management interface
  • Required access: Network reachability to the affected CGI endpoint; authentication requirements depend on deployment configuration and endpoint exposure
  • Trigger point: Processing of the sectiontype argument by the set_table function
  • Why exploitation is possible: Insufficient neutralization or separation of attacker-controlled input allows data to be interpreted as operating-system command syntax
  • Attack surface: The Vigor2960 CGI/web management interface
  • Required access: Network reachability to the affected CGI endpoint; authentication requirements depend on deployment configuration and endpoint exposure
  • Trigger point: Processing of the sectiontype argument by the set_table function
  • Why exploitation is possible: Insufficient neutralization or separation of attacker-controlled input allows data to be interpreted as operating-system command syntax

Why this happens

The underlying flaw is command injection caused by passing externally influenced input into an operating-system command construction or execution path without robust command separation and validation.

This maps primarily to CWE-77: Improper Neutralization of Special Elements used in a Command, with CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component describing the broader injection pattern. Treating request parameters as trusted command fragments allows input to cross from the application layer into the system shell or command interpreter.

The underlying flaw is command injection caused by passing externally influenced input into an operating-system command construction or execution path without robust command separation and validation.

This maps primarily to CWE-77: Improper Neutralization of Special Elements used in a Command, with CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component describing the broader injection pattern. Treating request parameters as trusted command fragments allows input to cross from the application layer into the system shell or command interpreter.

Potential impact

  • An attacker may execute operating-system commands on the router
  • The device may be compromised or have its configuration altered
  • Network traffic could be redirected, monitored, or disrupted
  • Credentials, secrets, or operational data could be exposed
  • The compromised device could be used for lateral movement or further attacks
  • Availability may be reduced through service disruption or destructive actions
  • An attacker may execute operating-system commands on the router
  • The device may be compromised or have its configuration altered
  • Network traffic could be redirected, monitored, or disrupted
  • Credentials, secrets, or operational data could be exposed
  • The compromised device could be used for lateral movement or further attacks
  • Availability may be reduced through service disruption or destructive actions

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from request-handling paths and reducing trust in CGI parameters.

Common defensive patterns include:

  • Replacing shell commands with structured library or system APIs
  • Allowing only explicitly defined sectiontype values through strict allowlists
  • Separating command arguments from command selection rather than concatenating strings
  • Applying context-appropriate escaping only as a secondary safeguard, not as the primary control
  • Restricting management interfaces to trusted networks and limiting administrative exposure
  • Running CGI services with the lowest practical operating-system privileges
  • Applying compensating network controls when vendor maintenance is limited or unavailable
  • Maintaining an inventory and retirement plan for unsupported network appliances

Mitigation generally focuses on removing shell interpretation from request-handling paths and reducing trust in CGI parameters.

Common defensive patterns include:

  • Replacing shell commands with structured library or system APIs
  • Allowing only explicitly defined sectiontype values through strict allowlists
  • Separating command arguments from command selection rather than concatenating strings
  • Applying context-appropriate escaping only as a secondary safeguard, not as the primary control
  • Restricting management interfaces to trusted networks and limiting administrative exposure
  • Running CGI services with the lowest practical operating-system privileges
  • Applying compensating network controls when vendor maintenance is limited or unavailable
  • Maintaining an inventory and retirement plan for unsupported network appliances

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying shell execution, command construction, or subprocess calls that receive CGI parameters
  • Code review checks for string concatenation or interpolation involving request data
  • Tests that verify strict allowlisting and rejection of unexpected parameter values
  • Web and device logs showing unusual requests to /cgi-bin/mainfunction.cgi, especially abnormal sectiontype values or command-related metacharacters
  • Network monitoring for unexpected outbound connections or configuration changes from the appliance
  • Policy enforcement that restricts management interfaces and flags unsupported firmware in asset inventories

Organizations can look for this class of issue through:

  • Static analysis rules identifying shell execution, command construction, or subprocess calls that receive CGI parameters
  • Code review checks for string concatenation or interpolation involving request data
  • Tests that verify strict allowlisting and rejection of unexpected parameter values
  • Web and device logs showing unusual requests to /cgi-bin/mainfunction.cgi, especially abnormal sectiontype values or command-related metacharacters
  • Network monitoring for unexpected outbound connections or configuration changes from the appliance
  • Policy enforcement that restricts management interfaces and flags unsupported firmware in asset inventories

Sources

SourceLink
github.comgithub.com/yikesoftware/DrayTek_Vigor2960_Security_Analysis/tree/main/cases/DRV2960-0006-authenticated-set-table-command-injection
vuldb.comvuldb.com/cve/CVE-2026-113389
vuldb.comvuldb.com/submit/992223
vuldb.comvuldb.com/vuln/422665
vuldb.comvuldb.com/vuln/422665/cti

Frequently asked

questions

Yes, the reported attack surface is a remotely reachable CGI endpoint. Practical exploitability still depends on network exposure, access controls, and any authentication required by the deployment.

The provided information does not establish a universal authentication requirement. Access to the affected endpoint and the device's management exposure are key factors.

Avoid invoking a shell with request-derived strings. Use structured APIs, strict allowlists for accepted values, separated arguments, and least-privilege service execution.

Treat all CGI parameters as untrusted, enforce centralized input validation, review command execution paths, monitor management endpoints, and track unsupported appliances so compensating controls can be applied.

Yes, the reported attack surface is a remotely reachable CGI endpoint. Practical exploitability still depends on network exposure, access controls, and any authentication required by the deployment.

The provided information does not establish a universal authentication requirement. Access to the affected endpoint and the device's management exposure are key factors.

Avoid invoking a shell with request-derived strings. Use structured APIs, strict allowlists for accepted values, separated arguments, and least-privilege service execution.

Treat all CGI parameters as untrusted, enforce centralized input validation, review command execution paths, monitor management endpoints, and track unsupported appliances so compensating controls can be applied.

Find out what's already
exploitable in your codebase.