Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-113397 Overview
CVE-2026-113397 is a command injection vulnerability in the DrayTek Vigor2960 router firmware version 1.5.1.6 Revision 8218. The flaw resides in the ruequest_certificate function within /cgi-bin/mainfunction.cgi, part of the IPsec Handler component. An authenticated attacker can manipulate the option argument to inject arbitrary operating system commands over the network. The exploit has been publicly disclosed. DrayTek notes that the Vigor2960 is End-of-Sale with limited support, meaning only major unauthenticated vulnerabilities receive review going forward. Upgrading to firmware version 1.5.1.7 addresses the issue.
Critical Impact
Authenticated remote attackers can execute arbitrary commands on the router by injecting payloads through the option parameter of the IPsec certificate request handler.
Affected Products
- DrayTek Vigor2960 firmware 1.5.1.6 Revision 8218
- IPsec Handler component (/cgi-bin/mainfunction.cgi)
- ruequest_certificate function
Discovery Timeline
- 2026-10-20 - CVE-2026-113397 published to NVD
- 2026-10-20 - Last updated in NVD database
Technical Details for CVE-2026-113397
Vulnerability Analysis
The vulnerability is classified as [CWE-74] Improper Neutralization of Special Elements in Output Used by a Downstream Component (Injection). The affected ruequest_certificate function in /cgi-bin/mainfunction.cgi processes certificate-request operations tied to the IPsec Handler. The handler accepts an option parameter from HTTP requests and passes the value into a downstream system call without adequate neutralization of shell metacharacters.
Because the CGI binary runs with elevated privileges on the embedded device, successful injection yields command execution in the context of the router's management process. Attackers can leverage this to alter configuration, pivot into internal networks protected by the IPsec gateway, or persist on the device.
Root Cause
The root cause is missing input validation and improper neutralization of shell metacharacters in the option argument before it reaches a command-execution primitive. User-controlled input flows directly from the CGI request parser into a shell context, allowing operators such as ;, |, &, and backticks to break out of the intended command.
Attack Vector
Exploitation requires network access to the router's management interface and valid low-privileged credentials. The attacker sends a crafted HTTP request to /cgi-bin/mainfunction.cgi targeting the ruequest_certificate handler, embedding shell syntax in the option parameter. The command executes on the device with the privileges of the CGI process.
For technical analysis of the exploitation path, see the GitHub Security Analysis Case and the VulDB CVE-2026-113397 entry.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-113397
Indicators of Compromise
- HTTP POST or GET requests to /cgi-bin/mainfunction.cgi referencing the ruequest_certificate action with shell metacharacters in the option parameter.
- Unexpected child processes spawned by the CGI handler, such as sh, wget, curl, nc, or tftp.
- Outbound connections from the router to attacker-controlled infrastructure immediately following certificate-request traffic.
Detection Strategies
- Inspect router and upstream firewall logs for requests to mainfunction.cgi containing URL-encoded shell separators (%3B, %7C, %26, %60).
- Alert on authenticated management-plane sessions that are followed by anomalous outbound DNS or HTTP traffic from the device.
- Correlate IPsec configuration changes with the identity of the authenticated user who initiated the certificate-request flow.
Monitoring Recommendations
- Forward router syslog and HTTP access logs to a central platform for retention and query.
- Baseline normal administrative activity on the Vigor2960 so that non-standard option values are surfaced quickly.
- Monitor for firmware integrity drift and unexpected cron, startup, or configuration file modifications.
How to Mitigate CVE-2026-113397
Immediate Actions Required
- Upgrade affected Vigor2960 devices to firmware version 1.5.1.7, available from the DrayTek Vigor2960 Firmware download.
- Restrict access to the router's web management interface to trusted management networks only.
- Rotate credentials for all accounts able to reach the IPsec configuration pages, since the vulnerability is authenticated.
Patch Information
DrayTek released firmware 1.5.1.7 to correct multiple security issues on the Vigor2960, including this command injection. The vendor states that the Vigor2960 is End-of-Sale with limited support, and only major issues such as unauthenticated vulnerabilities will be reviewed going forward. Organizations should plan migration to a currently supported DrayTek model.
Workarounds
- Disable remote (WAN-side) access to the web management interface and allow management only from a dedicated VLAN.
- Place access control lists in front of the device to limit /cgi-bin/mainfunction.cgi to specific administrator IP addresses.
- Reduce the number of accounts with privileges to initiate IPsec certificate requests until firmware 1.5.1.7 is deployed.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

