Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-23 (相对路径遍历) — Vulnerability Class 345

345 vulnerabilities classified as CWE-23 (相对路径遍历). AI Chinese analysis included.

CWE-23, Relative Path Traversal, is a critical input validation weakness where applications fail to properly sanitize user-supplied data before constructing file system paths. Attackers typically exploit this vulnerability by injecting directory traversal sequences, such as “../”, into input fields to manipulate the resulting pathname. This manipulation allows them to escape the intended restricted directory and access sensitive files located elsewhere on the server, potentially leading to unauthorized data disclosure or remote code execution. To mitigate this risk, developers must rigorously validate and neutralize all external inputs, ensuring they do not contain relative path components. Implementing strict allowlists for permitted characters, using canonicalization functions to resolve paths before access checks, and employing chroot jails or containerization to isolate file system access are essential defensive strategies that effectively prevent attackers from traversing outside the designated directory boundaries.

MITRE CWE Description
The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.
Common Consequences (4)
Integrity, Confidentiality, AvailabilityExecute Unauthorized Code or Commands
The attacker may be able to create or overwrite critical files that are used to execute code, such as programs or libraries.
IntegrityModify Files or Directories
The attacker may be able to overwrite or create critical files, such as programs, libraries, or important data. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mechanism. For example, appending a new account at the end of a password file may allow …
ConfidentialityRead Files or Directories
The attacker may be able read the contents of unexpected files and expose sensitive data by traversing the file system to access files or directories that are outside of the restricted directory. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mech…
AvailabilityDoS: Crash, Exit, or Restart
The attacker may be able to overwrite, delete, or corrupt unexpected critical files such as programs, libraries, or important data. This may prevent the product from working at all and in the case of a protection mechanisms such as authentication, it has the potential to lockout every user of the pr…
Mitigations (3)
ImplementationAssume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range…
ImplementationInputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked. Use a built-in path canonicalization function (such as realpath(…
OperationUse an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
Effectiveness: Moderate
Examples (2)
The following URLs are vulnerable to this attack:
http://example.com/get-files.jsp?file=report.pdf http://example.com/get-page.php?home=aaa.html http://example.com/some-page.asp?page=index.html
Bad · Other
http://example.com/get-files?file=../../../../somedir/somefile http://example.com/../../../../etc/shadow http://example.com/get-files?file=../../../../etc/passwd
Attack · Other
The following code could be for a social networking application in which each user's profile information is stored in a separate file. All files are stored in a single directory.
my $dataPath = "/users/cwe/profiles"; my $username = param("user"); my $profilePath = $dataPath . "/" . $username; open(my $fh, "<", $profilePath) || ExitError("profile read error: $profilePath"); print "<ul>\n"; while (<$fh>) { print "<li>$_</li>\n"; } print "</ul>\n";
Bad · Perl
../../../etc/passwd
Attack
CVE IDTitleCVSSSeverityPublished
CVE-2023-1043 MuYuCMS index.php path traversal — MuYuCMS 4.3 Medium2023-02-26
CVE-2023-23778 Fortinet FortiWeb 路径遍历漏洞 — FortiWeb 4.7 Medium2023-02-16
CVE-2023-23784 Fortinet FortiWeb 路径遍历漏洞 — FortiWeb 5.6 Medium2023-02-16
CVE-2022-30299 Fortinet FortiWeb 路径遍历漏洞 — FortiWeb 5.0 Medium2023-02-16
CVE-2022-30300 Fortinet FortiWeb 路径遍历漏洞 — FortiWeb 6.2 Medium2023-02-16
CVE-2022-41335 Fortinet FortiOS和FortiSwitch 路径遍历漏洞 — FortiSwitchManager 8.6 High2023-02-16
CVE-2023-23379 Microsoft Defender for IoT Elevation of Privilege Vulnerability — Microsoft Defender for IoT 7.8 High2023-02-14
CVE-2023-0745 Arbitrary File Write in High Availability Backup Upload — YugabyteDB Anywhere 6.7 Medium2023-02-09
CVE-2022-29844 Western Digital My Cloud OS 5 arbitrary file read and write vulnerability via ftp — My Cloud 6.7 Medium2023-01-25
CVE-2023-20040 Cisco Network Services Orchestrator 代码问题漏洞 — Cisco Network Services Orchestrator 5.5 Medium2023-01-19
CVE-2022-38205 Portal for ArcGIS has a directory traversal vulnerability (10.9.1, 10.8.1 and 10.7.1 only) — ArcGIS Enterprise 8.6 High2022-12-30
CVE-2022-38202 BUG-000152121 - Directory traversal vulnerability in ArcGIS Server. — ArcGIS Server 7.5 High2022-12-28
CVE-2022-23854 AVEVA InTouch Access Anywhere Secure Gateway 路径遍历漏洞 — InTouch Access Anywhere 7.5 High2022-12-23
CVE-2022-23531 Arbitrary file write when scanning a specially-crafted local PyPI package — guarddog 5.8 Medium2022-12-16
CVE-2022-4123 Buildah 路径遍历漏洞 — podman 4.0 -2022-12-08
CVE-2022-42892 Siemens syngo Dynamics 路径遍历漏洞 — syngo Dynamics 5.3 -2022-11-17
CVE-2021-38399 Honeywell Experion PKS and ACE Controllers Relative Path Traversal — Experion PKS 7.5 High2022-10-28
CVE-2022-22245 Junos OS: Path traversal vulnerability in J-Web — Junos OS 4.3 Medium2022-10-18
CVE-2022-33937 Dell GeoDrive 路径遍历漏洞 — GeoDrive 7.1 High2022-10-12
CVE-2022-2922 Relative Path Traversal in dnnsoftware/dnn.platform — dnnsoftware/dnn.platform 7.5 -2022-09-30
CVE-2022-28814 Path traversal in Carlo Gavazzi UWP 3.0 could lead to full device access — UWP 3.0 Monitoring Gateway and Controller 9.8 Critical2022-09-28
CVE-2022-36081 Wikmd vulnerable to Local File Enumeration when accessing /list — wikmd 7.5 High2022-09-07
CVE-2022-34378 Dell PowerScale OneFS 路径遍历漏洞 — PowerScale OneFS 5.5 Medium2022-09-02
CVE-2022-34836 ABB Ability TM Operations Data Management Zenon Zenon Log Server file access control — ABB Zenon 5.9 Medium2022-08-24
CVE-2022-1373 Softing Secure Integration Server Relative Path Traversal — Secure Integration Server 7.2 High2022-08-17
CVE-2022-1648 Relative Path Traversal to Remote Code Execution in File Manager — Pandora FMS 5.7 Medium2022-07-26
CVE-2022-2139 Advantech iView — iView 6.5 Medium2022-07-22
CVE-2022-20913 Cisco Nexus Dashboard Arbitrary File Write Vulnerability — Cisco Nexus Dashboard 4.9 Medium2022-07-21
CVE-2022-20862 Cisco Unified Communications Manager Arbitrary File Read Vulnerability — Cisco Unified Communications Manager 4.3 Medium2022-07-06
CVE-2022-2106 Elcomplus SmartICS Path Traversal — SmartICS 3.8 Low2022-06-27

Vulnerabilities classified as CWE-23 (相对路径遍历) represent 345 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.