/

CVE-2026-113395

Severity:

HIGH RISK

(7.4)

Path Traversal (CWE-22) in DrayTek Vigor2960 CGI Handler

CVE-2026-113395

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized File Access or Manipulation

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 path traversal vulnerability in the DrayTek Vigor2960 web interface allows remote manipulation of the multipart argument processed by the swmconfigupload component. Where the affected endpoint is reachable and input is insufficiently restricted, an attacker may access or manipulate files outside the intended directory.

A path traversal vulnerability in the DrayTek Vigor2960 web interface allows remote manipulation of the multipart argument processed by the swmconfigupload component. Where the affected endpoint is reachable and input is insufficiently restricted, an attacker may access or manipulate files outside the intended directory.

Affected context

The issue occurs in the cgiEscape function within /cgi-bin/mainfunction.cgi, specifically in the swmconfigupload component of affected Vigor2960 firmware. Risk depends on the web interface being reachable by an attacker and on the process having access to files beyond the intended upload or configuration directory. The product is also described as end-of-support, which can limit long-term remediation and review.

The issue occurs in the cgiEscape function within /cgi-bin/mainfunction.cgi, specifically in the swmconfigupload component of affected Vigor2960 firmware. Risk depends on the web interface being reachable by an attacker and on the process having access to files beyond the intended upload or configuration directory. The product is also described as end-of-support, which can limit long-term remediation and review.

Exploit preconditions

  • Attack surface: Remotely reachable web interface endpoint
  • Required access: Access sufficient to submit requests to the affected swmconfigupload functionality; authentication requirements may depend on deployment configuration
  • Trigger point: Processing of the multipart argument by cgiEscape
  • Why exploitation is possible: Path input is not adequately constrained to the intended directory before file-related processing occurs
  • Attack surface: Remotely reachable web interface endpoint
  • Required access: Access sufficient to submit requests to the affected swmconfigupload functionality; authentication requirements may depend on deployment configuration
  • Trigger point: Processing of the multipart argument by cgiEscape
  • Why exploitation is possible: Path input is not adequately constrained to the intended directory before file-related processing occurs

Why this happens

The underlying flaw is improper restriction and canonicalization of user-controlled path data. When a request parameter is used in file-handling logic without reliably rejecting traversal sequences and resolving the final path within an approved directory, an attacker may influence which filesystem location is accessed. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

The underlying flaw is improper restriction and canonicalization of user-controlled path data. When a request parameter is used in file-handling logic without reliably rejecting traversal sequences and resolving the final path within an approved directory, an attacker may influence which filesystem location is accessed. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

Potential impact

  • An attacker may read files accessible to the web-service account
  • An attacker could manipulate or overwrite files if the process has write permission
  • Sensitive configuration data or credentials may be exposed
  • Device integrity or availability could be affected
  • The device may be used as a foothold for further attacks, depending on network placement
  • An attacker may read files accessible to the web-service account
  • An attacker could manipulate or overwrite files if the process has write permission
  • Sensitive configuration data or credentials may be exposed
  • Device integrity or availability could be affected
  • The device may be used as a foothold for further attacks, depending on network placement

General mitigation guidance

Mitigation generally focuses on enforcing a strict filesystem trust boundary and reducing the privileges of the affected service.

Common defensive patterns include:

  • Accepting only generated filenames or allowlisted relative names rather than arbitrary paths
  • Canonicalizing paths and verifying that the resolved result remains beneath an approved directory
  • Rejecting traversal markers, absolute paths, alternate path representations, and encoded equivalents
  • Separating uploaded content from executable, configuration, and system directories
  • Running web-facing services with minimal filesystem permissions
  • Restricting administrative interfaces through network segmentation and access controls
  • Monitoring the affected device lifecycle and using a maintained platform where practical

Mitigation generally focuses on enforcing a strict filesystem trust boundary and reducing the privileges of the affected service.

Common defensive patterns include:

  • Accepting only generated filenames or allowlisted relative names rather than arbitrary paths
  • Canonicalizing paths and verifying that the resolved result remains beneath an approved directory
  • Rejecting traversal markers, absolute paths, alternate path representations, and encoded equivalents
  • Separating uploaded content from executable, configuration, and system directories
  • Running web-facing services with minimal filesystem permissions
  • Restricting administrative interfaces through network segmentation and access controls
  • Monitoring the affected device lifecycle and using a maintained platform where practical

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying user-controlled values passed into file APIs or path construction
  • Code review checks for missing canonicalization and directory-boundary validation
  • Tests using encoded, alternate, absolute, and traversal-style path representations
  • Web-application policies that alert on unusual multipart values and requests targeting administrative upload functions
  • File-integrity monitoring for unexpected changes in web, configuration, or system locations
  • Automated security review tools that flag path construction from request parameters

Organizations can look for this class of issue through:

  • Static analysis rules identifying user-controlled values passed into file APIs or path construction
  • Code review checks for missing canonicalization and directory-boundary validation
  • Tests using encoded, alternate, absolute, and traversal-style path representations
  • Web-application policies that alert on unusual multipart values and requests targeting administrative upload functions
  • File-integrity monitoring for unexpected changes in web, configuration, or system locations
  • Automated security review tools that flag path construction from request parameters

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-0012-authenticated-swmconfigupload-fieldname-path-traversal-clobber
vuldb.comvuldb.com/cve/CVE-2026-113395
vuldb.comvuldb.com/submit/992248
vuldb.comvuldb.com/vuln/422671
vuldb.comvuldb.com/vuln/422671/cti

Frequently asked

questions

Yes, the published description indicates that the affected web functionality can be attacked remotely. Practical exploitability depends on network exposure, authentication controls, and the permissions of the service process.

The available description does not establish a universal authentication requirement. Administrators should treat reachability of the affected endpoint and the device's access controls as key factors.

Use a maintained, vendor-provided remediation where available, while ensuring that file paths are allowlisted, canonicalized, and confined to a dedicated directory. Access to administrative interfaces should also be restricted.

Avoid constructing filesystem paths directly from request parameters, apply boundary validation after canonicalization, minimize service privileges, and test file-handling endpoints with security-focused input cases.

Yes, the published description indicates that the affected web functionality can be attacked remotely. Practical exploitability depends on network exposure, authentication controls, and the permissions of the service process.

The available description does not establish a universal authentication requirement. Administrators should treat reachability of the affected endpoint and the device's access controls as key factors.

Use a maintained, vendor-provided remediation where available, while ensuring that file paths are allowlisted, canonicalized, and confined to a dedicated directory. Access to administrative interfaces should also be restricted.

Avoid constructing filesystem paths directly from request parameters, apply boundary validation after canonicalization, minimize service privileges, and test file-handling endpoints with security-focused input cases.

Find out what's already
exploitable in your codebase.