/

CVE-2026-113390

Severity:

CRITICAL RISK

(9.9)

OS Command Injection (CWE-78) in DrayTek Vigor2960

CVE-2026-113390

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77, CWE-78

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 flaw in the DrayTek Vigor2960 CGI interface allows attacker-controlled request arguments to reach operating-system command execution logic.

Because the vulnerable interface can be reached remotely, exploitation may allow an attacker to execute commands on the router and compromise its operation, depending on access controls and deployment exposure.

A critical command injection flaw in the DrayTek Vigor2960 CGI interface allows attacker-controlled request arguments to reach operating-system command execution logic.

Because the vulnerable interface can be reached remotely, exploitation may allow an attacker to execute commands on the router and compromise its operation, depending on access controls and deployment exposure.

Affected context

The issue occurs in the Vigor2960 1.5.1.6 Revision 8218 CGI interface, specifically within the sub_182B0 function in /cgi-bin/mainfunction.cgi. It becomes risky when externally supplied values for usefile, usescript, or option are incorporated into operating-system command processing without sufficiently separating data from commands. Exposure and exploitability may depend on the device's network accessibility and authentication configuration.

The issue occurs in the Vigor2960 1.5.1.6 Revision 8218 CGI interface, specifically within the sub_182B0 function in /cgi-bin/mainfunction.cgi. It becomes risky when externally supplied values for usefile, usescript, or option are incorporated into operating-system command processing without sufficiently separating data from commands. Exposure and exploitability may depend on the device's network accessibility and authentication configuration.

Exploit preconditions

  • Attack surface: The remotely reachable CGI interface on the router
  • Required access: Network access to the exposed management or web interface; authentication requirements are deployment-dependent
  • Trigger point: Processing of the usefile, usescript, or option arguments
  • Why exploitation is possible: Attacker-controlled input can influence operating-system command construction or execution without adequate command and argument separation
  • Attack surface: The remotely reachable CGI interface on the router
  • Required access: Network access to the exposed management or web interface; authentication requirements are deployment-dependent
  • Trigger point: Processing of the usefile, usescript, or option arguments
  • Why exploitation is possible: Attacker-controlled input can influence operating-system command construction or execution without adequate command and argument separation

Why this happens

The vulnerability is an OS command injection flaw mapped primarily to CWE-78: Improper Neutralization of Special Elements used in an OS Command. The CGI handler appears to pass request-controlled values into a command execution path without reliably treating them as inert data. This also relates to CWE-77: Improper Neutralization of Special Elements used in a Command, which covers unsafe composition of commands from untrusted input.

The vulnerability is an OS command injection flaw mapped primarily to CWE-78: Improper Neutralization of Special Elements used in an OS Command. The CGI handler appears to pass request-controlled values into a command execution path without reliably treating them as inert data. This also relates to CWE-77: Improper Neutralization of Special Elements used in a Command, which covers unsafe composition of commands from untrusted input.

Potential impact

  • An attacker may execute arbitrary commands with the privileges of the CGI service
  • The router could be compromised or reconfigured
  • Network traffic may be intercepted, redirected, or disrupted
  • Credentials, configuration data, or connected-device information could be exposed
  • The compromised device could be used for lateral movement or additional attacks
  • An attacker may execute arbitrary commands with the privileges of the CGI service
  • The router could be compromised or reconfigured
  • Network traffic may be intercepted, redirected, or disrupted
  • Credentials, configuration data, or connected-device information could be exposed
  • The compromised device could be used for lateral movement or additional attacks

General mitigation guidance

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

Common defensive patterns include:

  • Prefer direct process APIs with fixed executables and separate argument arrays instead of shell command construction
  • Apply strict allowlists and typed validation for file, script, and option values
  • Avoid accepting client-controlled paths or executable content where possible
  • Enforce authentication, network segmentation, and restricted administrative exposure for device interfaces
  • Run service components with the least privileges needed and limit their ability to modify system configuration
  • Treat unsupported devices as higher-risk assets and establish compensating monitoring and replacement planning

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

Common defensive patterns include:

  • Prefer direct process APIs with fixed executables and separate argument arrays instead of shell command construction
  • Apply strict allowlists and typed validation for file, script, and option values
  • Avoid accepting client-controlled paths or executable content where possible
  • Enforce authentication, network segmentation, and restricted administrative exposure for device interfaces
  • Run service components with the least privileges needed and limit their ability to modify system configuration
  • Treat unsupported devices as higher-risk assets and establish compensating monitoring and replacement planning

How teams detect issues like this

Organizations can look for command injection risks through:

  • Static analysis rules identifying shell execution or command-building APIs fed by CGI parameters
  • Code review checks for string concatenation, interpolation, or shell invocation involving request values
  • Tests that verify special characters and unexpected arguments are rejected rather than interpreted
  • Web application firewall or gateway policies that restrict unneeded CGI endpoints and suspicious parameter patterns
  • Device and network monitoring for unusual administrative requests, configuration changes, outbound connections, or process activity

Automated security review tools may help identify unsafe data flows from HTTP parameters into command execution functions.

Organizations can look for command injection risks through:

  • Static analysis rules identifying shell execution or command-building APIs fed by CGI parameters
  • Code review checks for string concatenation, interpolation, or shell invocation involving request values
  • Tests that verify special characters and unexpected arguments are rejected rather than interpreted
  • Web application firewall or gateway policies that restrict unneeded CGI endpoints and suspicious parameter patterns
  • Device and network monitoring for unusual administrative requests, configuration changes, outbound connections, or process activity

Automated security review tools may help identify unsafe data flows from HTTP parameters into command execution functions.

Sources

SourceLink
github.comgithub.com/yikesoftware/DrayTek_Vigor2960_Security_Analysis/tree/main/cases/DRV2960-0007-authenticated-jsonstatus-usefile-file-clobber
vuldb.comvuldb.com/cve/CVE-2026-113390
vuldb.comvuldb.com/submit/992224
vuldb.comvuldb.com/vuln/422666
vuldb.comvuldb.com/vuln/422666/cti

Frequently asked

questions

Yes. The described flaw is reachable through the CGI interface over a network, although actual exposure depends on interface availability, network placement, and authentication controls.

The available description does not establish a universal authentication requirement. The relevant prerequisite is access to the affected CGI endpoint, so deployment-specific access controls should be reviewed.

Prevent request data from being interpreted as shell syntax. Use fixed command mappings, structured argument handling, strict allowlists, and least-privilege execution.

Minimize exposed management interfaces, validate all CGI parameters by type and allowed value, scan data flows into command APIs, and monitor for unexpected device behavior.

Yes. The described flaw is reachable through the CGI interface over a network, although actual exposure depends on interface availability, network placement, and authentication controls.

The available description does not establish a universal authentication requirement. The relevant prerequisite is access to the affected CGI endpoint, so deployment-specific access controls should be reviewed.

Prevent request data from being interpreted as shell syntax. Use fixed command mappings, structured argument handling, strict allowlists, and least-privilege execution.

Minimize exposed management interfaces, validate all CGI parameters by type and allowed value, scan data flows into command APIs, and monitor for unexpected device behavior.

Find out what's already
exploitable in your codebase.