DrayTek Vigor2960 Path Traversal Vulnerability (CVE-2026-129451)
Overview
The vulnerability resides in the CGI script /cgi-bin/mainfunction.cgi, specifically the app_guest_export function, where the filename parameter is not properly validated. An attacker can supply crafted input that traverses directories and accesses files beyond the intended export location. The issue is exploitable remotely without authentication and has been publicly disclosed.
Technical Details
When the vulnerable device processes a request to app_guest_export, it concatenates the supplied filename directly into a filesystem path without sanitizing path separators. By supplying sequences such as "../" the attacker can cause the server to traverse up the directory hierarchy and read files outside the allowed export directory. The flaw is present in all firmware versions up to 1.5.1.6 of the DrayTek Vigor2960 series and can be triggered via a standard HTTP GET/POST request to the affected CGI endpoint.
Impact
An unauthenticated remote attacker can retrieve sensitive configuration files, credentials, or other data stored on the device's filesystem, potentially leading to further compromise of the network. All deployments of DrayTek Vigor2960 running firmware up to 1.5.1.6 are exposed.
Recommended Actions
- Patch the device to firmware version 1.5.1.7 or later.
- Restrict remote access to the management interface to trusted networks only.
- Disable the guest export feature if it is not required.
- Monitor request logs for unusual calls to /cgi-bin/mainfunction.cgi with suspicious filename parameters.
Detection
Review web server and CGI logs for requests targeting /cgi-bin/mainfunction.cgi that include path traversal patterns such as "../" in the filename parameter. Correlate with any unexpected file reads or access errors. Enable detailed request logging if not already active and alert on repeated traversal attempts.