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

Goal: 1000 CNY · Raised: 1336 CNY

100%

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

412 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, Availability Execute 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.
Integrity Modify 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 …
Confidentiality Read 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…
Availability DoS: 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)
Implementation Assume 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…
Implementation Inputs 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(…
Operation Use 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 ID Title CVSS Severity Published
CVE-2024-22096 Relative Path Traversal in Rapid SCADA — Rapid SCADA 6.5 Medium 2024-02-01
CVE-2024-22415 Unsecured endpoints in the jupyter-lsp server extension — jupyterlab-lsp 7.3 High 2024-01-18
CVE-2023-31036 CVE — Triton Inference Server 7.5 High 2024-01-12
CVE-2023-50255 Zip Path Traversal in Deepin-Compressor — developer-center 9.3 Critical 2023-12-27
CVE-2023-6722 Relative Path Traversal in Repox — Repox 7.5 High 2023-12-13
CVE-2023-6307 jeecgboot JimuReport image path traversal — JimuReport 6.3 Medium 2023-11-27
CVE-2023-5189 Hub: insecure galaxy-importer tarfile extraction — Red Hat Ansible Automation Platform 2.4 for RHEL 8 6.3 Medium 2023-11-14
CVE-2023-42783 Fortinet FortiWLM 安全漏洞 — FortiWLM 7.3 High 2023-11-14
CVE-2023-47613 Telit Cinterion BGS5 安全漏洞 — BGS5 4.4 Medium 2023-11-09
CVE-2023-37913 org.xwiki.platform:xwiki-platform-office-importer vulnerable to arbitrary server side file writing from account through office converter — xwiki-platform 10.0 Critical 2023-10-25
CVE-2023-46119 Parse Server may crash when uploading file without extension — parse-server 7.5 High 2023-10-25
CVE-2023-3701 Relative path traversal in Aqua eSolutions — Aqua Drive 9.9 Critical 2023-10-04
CVE-2023-3512 Relative path traversal in Setelsa Security ConacWin CB — ConacWin CB 7.5 High 2023-10-04
CVE-2023-42456 sudo-rs Session File Relative Path Traversal vulnerability — sudo-rs 3.3 Low 2023-09-21
CVE-2023-4914 Relative Path Traversal in cecilapp/cecil — cecilapp/cecil 7.5 - 2023-09-12
CVE-2023-4897 Relative Path Traversal in mintplex-labs/anything-llm — mintplex-labs/anything-llm 9.1 - 2023-09-11
CVE-2023-38185 Microsoft Exchange Server Remote Code Execution Vulnerability — Microsoft Exchange Server 2016 Cumulative Update 23 8.8 High 2023-08-08
CVE-2023-35359 Windows Kernel Elevation of Privilege Vulnerability — Windows 10 Version 1507 7.8 High 2023-08-08
CVE-2023-34394 Keysight N6845A Relative Path Traversal — N6845A Geolocation Server 7.8 High 2023-07-19
CVE-2023-2913 Rockwell Automation ThinManager ThinServer Path Traversal Vulnerability — ThinManager ThinServer 7.5 High 2023-07-18
CVE-2023-34117 Zoom Client 路径遍历漏洞 — Zoom Client SDK 3.3 Low 2023-07-11
CVE-2023-37288 SmartBPM.NET - Path Traversal — SmartBPM.NET 6.5 Medium 2023-07-10
CVE-2023-33144 Visual Studio Code Spoofing Vulnerability — Visual Studio Code 6.6 Medium 2023-06-13
CVE-2022-42474 多款Fortinet产品 路径遍历漏洞 — FortiSwitchManager 6.2 Medium 2023-06-13
CVE-2023-27993 Fortinet FortiADC 路径遍历漏洞 — FortiADC 5.7 Medium 2023-05-03
CVE-2023-2356 Relative Path Traversal in mlflow/mlflow — mlflow/mlflow 7.7 - 2023-04-28
CVE-2022-42470 Fortinet FortiClient 路径遍历漏洞 — FortiClientWindows 7.1 High 2023-04-11
CVE-2023-29189 HTTP Verb Tampering vulnerability in SAP CRM (WebClient UI) — CRM (WebClient UI) 5.4 Medium 2023-04-11
CVE-2023-20066 Cisco IOS XE Software Web UI Path Traversal Vulnerability — Cisco IOS XE Software 6.5 Medium 2023-03-23
CVE-2023-23391 Office for Android Spoofing Vulnerability — Microsoft Office for Android 5.5 Medium 2023-03-14

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