/

CVE-2026-113397

Severity:

HIGH RISK

(7.4)

OS Command Injection (CWE-74) in DrayTek Vigor2960

CVE-2026-113397

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-74, CWE-77

Impact:

Remote Code Execution

Severity:

HIGH RISK

(7.4)

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 command injection vulnerability in the DrayTek Vigor2960 IPsec Handler allows attacker-controlled input in the option argument to influence operating-system command processing. Because the affected CGI function is remotely reachable, an attacker who can access the relevant endpoint may execute commands with the privileges of the web service.

A command injection vulnerability in the DrayTek Vigor2960 IPsec Handler allows attacker-controlled input in the option argument to influence operating-system command processing. Because the affected CGI function is remotely reachable, an attacker who can access the relevant endpoint may execute commands with the privileges of the web service.

Affected context

The issue occurs in the ruequest_certificate function within /cgi-bin/mainfunction.cgi, which is associated with the IPsec Handler. It becomes risky when the CGI endpoint is reachable over a network and the option parameter is incorporated into command execution without sufficiently separating data from operating-system instructions. The affected product is an end-of-support device with limited ongoing security review.

The issue occurs in the ruequest_certificate function within /cgi-bin/mainfunction.cgi, which is associated with the IPsec Handler. It becomes risky when the CGI endpoint is reachable over a network and the option parameter is incorporated into command execution without sufficiently separating data from operating-system instructions. The affected product is an end-of-support device with limited ongoing security review.

Exploit preconditions

  • Attack surface: The remotely reachable CGI interface used by the IPsec Handler
  • Required access: Network access to the affected endpoint; the description does not establish whether authentication is required
  • Trigger point: Processing of the option argument by ruequest_certificate
  • Why exploitation is possible: User-controlled input reaches an operating-system command execution path without adequate command and argument separation
  • Attack surface: The remotely reachable CGI interface used by the IPsec Handler
  • Required access: Network access to the affected endpoint; the description does not establish whether authentication is required
  • Trigger point: Processing of the option argument by ruequest_certificate
  • Why exploitation is possible: User-controlled input reaches an operating-system command execution path without adequate command and argument separation

Why this happens

The underlying bug is a failure to treat request data as untrusted data before it reaches a command interpreter or operating-system command construction routine. When input is concatenated into a command or otherwise passed through an unsafe execution path, control characters or command syntax may alter the intended operation. This maps primarily to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), with CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') describing the more specific command-processing weakness.

The underlying bug is a failure to treat request data as untrusted data before it reaches a command interpreter or operating-system command construction routine. When input is concatenated into a command or otherwise passed through an unsafe execution path, control characters or command syntax may alter the intended operation. This maps primarily to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), with CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') describing the more specific command-processing weakness.

Potential impact

  • An attacker may execute arbitrary commands on the device
  • The attacker could alter network, VPN, or system configuration
  • Device credentials, secrets, or traffic-related information may be exposed
  • The device may be used for persistence, disruption, or movement toward connected networks
  • Availability and integrity of IPsec services may be affected
  • An attacker may execute arbitrary commands on the device
  • The attacker could alter network, VPN, or system configuration
  • Device credentials, secrets, or traffic-related information may be exposed
  • The device may be used for persistence, disruption, or movement toward connected networks
  • Availability and integrity of IPsec services may be affected

General mitigation guidance

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

Common defensive patterns include:

  • Prefer direct APIs that pass fixed argument arrays to processes rather than invoking a shell
  • Apply strict allowlist validation for operation selectors such as option
  • Keep command names and privileged arguments separate from user-controlled values
  • Run CGI and management components with the minimum required privileges
  • Restrict administrative interfaces to trusted management networks and disable unnecessary exposure
  • Apply compensating network controls when legacy or unsupported appliances cannot be changed

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

Common defensive patterns include:

  • Prefer direct APIs that pass fixed argument arrays to processes rather than invoking a shell
  • Apply strict allowlist validation for operation selectors such as option
  • Keep command names and privileged arguments separate from user-controlled values
  • Run CGI and management components with the minimum required privileges
  • Restrict administrative interfaces to trusted management networks and disable unnecessary exposure
  • Apply compensating network controls when legacy or unsupported appliances cannot be changed

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying shell execution, command concatenation, and unsafe process-spawning APIs in CGI handlers
  • Code review checks for request parameters flowing into system commands without allowlist validation
  • Web application testing that verifies metacharacters and unexpected parameter values are rejected without executing downstream operations
  • Monitoring for anomalous requests to /cgi-bin/mainfunction.cgi, unusual certificate-related activity, and unexpected child processes spawned by web services
  • Policy enforcement that prohibits direct shell invocation in internet-facing management components

Automated application-security and firmware-analysis tools may help identify these data-flow patterns.

Organizations can look for this weakness through:

  • Static analysis rules identifying shell execution, command concatenation, and unsafe process-spawning APIs in CGI handlers
  • Code review checks for request parameters flowing into system commands without allowlist validation
  • Web application testing that verifies metacharacters and unexpected parameter values are rejected without executing downstream operations
  • Monitoring for anomalous requests to /cgi-bin/mainfunction.cgi, unusual certificate-related activity, and unexpected child processes spawned by web services
  • Policy enforcement that prohibits direct shell invocation in internet-facing management components

Automated application-security and firmware-analysis tools may help identify these data-flow patterns.

Sources

SourceLink
fw.draytek.com.twfw.draytek.com.tw/Vigor2960/Firmware/v1.5.1.7/Vigor2960_v1.5.1.7.zip
github.comgithub.com/yikesoftware/DrayTek_Vigor2960_Security_Analysis/tree/main/cases/DRV2960-0014-authenticated-request-certificate-command-injection
vuldb.comvuldb.com/cve/CVE-2026-113397
vuldb.comvuldb.com/submit/992250
vuldb.comvuldb.com/vuln/422673
vuldb.comvuldb.com/vuln/422673/cti

Frequently asked

questions

Yes. The affected CGI functionality is described as remotely reachable, although practical exploitability depends on network exposure and any authentication or access controls protecting the endpoint.

The available description does not specify an authentication requirement. Access to the vulnerable handler and permission to submit requests are the relevant conditions.

Remove shell-based command construction, use fixed command mappings and argument arrays, and enforce strict allowlists for operation parameters. Restrict access to the management interface as an additional control.

Treat all request parameters as untrusted, use secure process-execution APIs, perform command-injection-focused code review and testing, and apply least privilege to network management services.

Yes. The affected CGI functionality is described as remotely reachable, although practical exploitability depends on network exposure and any authentication or access controls protecting the endpoint.

The available description does not specify an authentication requirement. Access to the vulnerable handler and permission to submit requests are the relevant conditions.

Remove shell-based command construction, use fixed command mappings and argument arrays, and enforce strict allowlists for operation parameters. Restrict access to the management interface as an additional control.

Treat all request parameters as untrusted, use secure process-execution APIs, perform command-injection-focused code review and testing, and apply least privilege to network management services.

Find out what's already
exploitable in your codebase.