/

CVE-2026-113394

Severity:

HIGH RISK

(7.4)

Path Traversal (CWE-22) in DrayTek Vigor2960 Router

CVE-2026-113394

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 allows remotely supplied input to influence file path handling in the setSWMProfile function.

Under conditions where the vulnerable CGI endpoint is reachable and insufficiently protected, an attacker may access or manipulate files outside the intended directory scope.

A path traversal vulnerability in the DrayTek Vigor2960 allows remotely supplied input to influence file path handling in the setSWMProfile function.

Under conditions where the vulnerable CGI endpoint is reachable and insufficiently protected, an attacker may access or manipulate files outside the intended directory scope.

Affected context

The vulnerability occurs in the setSWMProfile function within /cgi-bin/mainfunction.cgi on affected Vigor2960 firmware.

It is associated with the handling of the setSWMProfile argument and may be reachable remotely through the device's web interface. The described issue affects a legacy product that is no longer generally supported, so deployment exposure and available maintenance controls may vary.

The vulnerability occurs in the setSWMProfile function within /cgi-bin/mainfunction.cgi on affected Vigor2960 firmware.

It is associated with the handling of the setSWMProfile argument and may be reachable remotely through the device's web interface. The described issue affects a legacy product that is no longer generally supported, so deployment exposure and available maintenance controls may vary.

Exploit preconditions

  • Attack surface: The Vigor2960 web CGI interface, specifically the mainfunction.cgi handler
  • Required access: Network reachability to the affected device; additional authentication requirements depend on deployment configuration
  • Trigger point: Processing of the setSWMProfile argument by the setSWMProfile function
  • Why exploitation is possible: Input influencing a filesystem path is not sufficiently constrained to the intended directory, allowing traversal beyond the expected path boundary
  • Attack surface: The Vigor2960 web CGI interface, specifically the mainfunction.cgi handler
  • Required access: Network reachability to the affected device; additional authentication requirements depend on deployment configuration
  • Trigger point: Processing of the setSWMProfile argument by the setSWMProfile function
  • Why exploitation is possible: Input influencing a filesystem path is not sufficiently constrained to the intended directory, allowing traversal beyond the expected path boundary

Why this happens

The underlying bug is improper restriction of user-controlled path components. When an application constructs or resolves filesystem paths from request data without canonicalization and boundary enforcement, traversal sequences may cause the resulting path to escape its intended directory.

This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

The underlying bug is improper restriction of user-controlled path components. When an application constructs or resolves filesystem paths from request data without canonicalization and boundary enforcement, traversal sequences may cause the resulting path to escape its intended directory.

This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

Potential impact

  • An attacker may read files outside the intended configuration directory
  • An attacker could alter or replace files if the affected process has write permissions
  • Device configuration or credentials may be exposed
  • Successful exploitation could support persistence, service disruption, or follow-on compromise
  • An attacker may read files outside the intended configuration directory
  • An attacker could alter or replace files if the affected process has write permissions
  • Device configuration or credentials may be exposed
  • Successful exploitation could support persistence, service disruption, or follow-on compromise

General mitigation guidance

Mitigation generally focuses on eliminating direct trust in request-controlled filesystem paths and reducing the privileges available to the web process.

Common defensive patterns include:

  • Resolve paths canonically and verify that they remain within an approved base directory
  • Prefer fixed identifiers mapped to server-side filenames over user-supplied path values
  • Reject traversal indicators and unexpected path separators as defense-in-depth, not as the sole control
  • Apply strict allowlists and schema validation to profile-related parameters
  • Run web-facing services with the minimum filesystem permissions required
  • Restrict administrative interfaces to trusted management networks and use compensating controls for unsupported devices
  • Maintain a supported firmware lifecycle where feasible and isolate legacy equipment when continued operation is necessary

Mitigation generally focuses on eliminating direct trust in request-controlled filesystem paths and reducing the privileges available to the web process.

Common defensive patterns include:

  • Resolve paths canonically and verify that they remain within an approved base directory
  • Prefer fixed identifiers mapped to server-side filenames over user-supplied path values
  • Reject traversal indicators and unexpected path separators as defense-in-depth, not as the sole control
  • Apply strict allowlists and schema validation to profile-related parameters
  • Run web-facing services with the minimum filesystem permissions required
  • Restrict administrative interfaces to trusted management networks and use compensating controls for unsupported devices
  • Maintain a supported firmware lifecycle where feasible and isolate legacy equipment when continued operation is necessary

How teams detect issues like this

Organizations can look for path traversal risks through:

  • Static analysis rules identifying filesystem APIs that consume HTTP parameters or CGI arguments
  • Code review checks for missing canonicalization, base-directory validation, or filename allowlists
  • Web application firewall policies monitoring traversal patterns and abnormal profile-management requests
  • Device and network logs showing unusual requests to CGI endpoints or unexpected configuration-file access
  • File integrity monitoring for changes to sensitive device files where such telemetry is available

Automated security scanning and code review tools may help identify similar path-handling patterns, but findings should be validated against the device's actual filesystem behavior.

Organizations can look for path traversal risks through:

  • Static analysis rules identifying filesystem APIs that consume HTTP parameters or CGI arguments
  • Code review checks for missing canonicalization, base-directory validation, or filename allowlists
  • Web application firewall policies monitoring traversal patterns and abnormal profile-management requests
  • Device and network logs showing unusual requests to CGI endpoints or unexpected configuration-file access
  • File integrity monitoring for changes to sensitive device files where such telemetry is available

Automated security scanning and code review tools may help identify similar path-handling patterns, but findings should be validated against the device's actual filesystem behavior.

Sources

SourceLink
github.comgithub.com/yikesoftware/DrayTek_Vigor2960_Security_Analysis/tree/main/cases/DRV2960-0011-authenticated-swmprofile-path-traversal-clobber
vuldb.comvuldb.com/cve/CVE-2026-113394
vuldb.comvuldb.com/submit/992247
vuldb.comvuldb.com/vuln/422670
vuldb.comvuldb.com/vuln/422670/cti

Frequently asked

questions

The reported issue can be initiated remotely when the affected CGI interface is reachable. The practical scope depends on network exposure, authentication controls, and device configuration.

The supplied information does not establish a universal authentication requirement. Access to the endpoint and any applicable authentication or authorization controls should be assessed for each deployment.

Constrain profile references to trusted server-side identifiers, enforce canonical path boundaries, validate inputs strictly, and run the handling process with minimal filesystem privileges.

Combine secure path-resolution helpers, allowlisted filenames, code review for filesystem operations, network restriction of management interfaces, and monitoring for suspicious traversal attempts.

The reported issue can be initiated remotely when the affected CGI interface is reachable. The practical scope depends on network exposure, authentication controls, and device configuration.

The supplied information does not establish a universal authentication requirement. Access to the endpoint and any applicable authentication or authorization controls should be assessed for each deployment.

Constrain profile references to trusted server-side identifiers, enforce canonical path boundaries, validate inputs strictly, and run the handling process with minimal filesystem privileges.

Combine secure path-resolution helpers, allowlisted filenames, code review for filesystem operations, network restriction of management interfaces, and monitoring for suspicious traversal attempts.

Find out what's already
exploitable in your codebase.