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-2021-29100 ArcGIS Earth has a File Parsing Directory Traversal Vulnerability — ArcGIS Earth 7.8 -2021-05-05
CVE-2020-4039 Directory Traversal Vulnerability in SUSI.AI Server — susi_server 8.6 High2021-04-30
CVE-2020-7861 AnySupport directory traversing vulnerability — AquaNPlayer 8.4 High2021-04-22
CVE-2020-8570 Kubernetes Java client libraries unvalidated path traversal in Copy implementation — Kubernetes Java Client 7.5 -2021-01-21
CVE-2020-17518 Apache Flink directory traversal attack: remote file writing through the REST API — Apache Flink 7.5 -2021-01-05
CVE-2019-19287 Siemens XHQ 信息泄露漏洞 — XHQ 7.5 -2020-12-14
CVE-2020-8271 Citrix Systems SD-WAN Center 路径遍历漏洞 — Citrix SD-WAN Center 9.8 -2020-11-16
CVE-2020-25172 B. Braun OnlineSuite — OnlineSuite 9.8 -2020-11-06
CVE-2020-8254 Pulse Secure Pulse Desktop Client 路径遍历漏洞 — Pulse Secure Desktop Client 8.8 -2020-10-28
CVE-2019-17640 Eclipse Vert.x 路径遍历漏洞 — Eclipse Vert.x 9.8 -2020-10-15
CVE-2020-3597 Cisco Nexus Data Broker Software Path Traversal Vulnerability — Cisco Nexus Data Broker 5.4 Medium2020-10-08
CVE-2020-1904 Facebook WhatsApp 路径遍历漏洞 — WhatsApp for iOS 5.5 -2020-10-06
CVE-2020-7376 Rapid7 Metasploit Framework Relative Path Traversal in enum_osx module — Metasploit Framework 7.1 High2020-08-24
CVE-2020-7377 Rapid7 Metasploit Framework Relative Path Traversal in telpho10_credential_dump module — Metasploit Framework 8.1 High2020-08-24
CVE-2020-5410 Directory Traversal with spring-cloud-config-server — Spring Cloud Config 6.5 -2020-06-02
CVE-2020-12026 Advantech WebAccess Node 路径遍历漏洞 — Advantech WebAccess Node 8.1 -2020-05-08
CVE-2020-12006 Advantech WebAccess Node 路径遍历漏洞 — Advantech WebAccess Node 8.1 -2020-05-08
CVE-2020-12010 Advantech WebAccess Node 路径遍历漏洞 — Advantech WebAccess Node 6.6 -2020-05-08
CVE-2020-10619 Advantech WebAccess/NMS 路径遍历漏洞 — WebAccess/NMS 9.1 -2020-04-09
CVE-2020-10631 Advantech WebAccess/NMS 路径遍历漏洞 — WebAccess/NMS 9.8 -2020-04-09
CVE-2020-7008 VISAM VBASE Editor和VBASE Web-Remote Module 路径遍历漏洞 — VBASE Editor 7.5 -2020-04-03
CVE-2020-5284 Directory Traversal in Next.js versions below 9.3.2 — next.js 4.4 Medium2020-03-30
CVE-2020-5280 Local file inclusion vulnerability in http4s — http4s 7.6 High2020-03-25
CVE-2020-8865 Horde Groupware Webmail 路径遍历漏洞 — Groupware Webmail Edition 8.8 -2020-03-23
CVE-2020-5405 Directory Traversal with spring-cloud-config-server — Spring Cloud Config 6.5 -2020-03-05
CVE-2020-5237 Relative Path Traversal in oneup/uploader-bundle — oneup/uploader-bundle 8.8 High2020-02-05
CVE-2018-12476 obs-service-extract_file's outfilename parameter allows to write files outside of package directory — SUSE Linux Enterprise Server 15 4.3 Medium2020-01-27
CVE-2019-18338 Siemens SiNVR 3 Central Control Server和SiNVR 3 Video Server 路径遍历漏洞 — Control Center Server (CCS) 7.7 High2019-12-12
CVE-2019-13944 Siemens EN100 Ethernet module 路径遍历漏洞 — EN100 Ethernet module DNP3 variant 5.3 -2019-12-12
CVE-2019-3976 MikroTik RouterOS 路径遍历漏洞 — MikroTik RouterOS 8.1 -2019-10-28

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