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-3940 Multiple arbitrary file reads in ZkTeco-based OEM devices — ZkTeco-based OEM devices with firmware ZAM170-NF-1.8.25-7354-Ver1.0.0 7.5 High2024-05-21
CVE-2024-33615 CyberPower PowerPanel business Relative Path Traversal — PowerPanel business 8.8 High2024-05-15
CVE-2024-30010 Windows Hyper-V Remote Code Execution Vulnerability — Windows Server 2019 8.8 High2024-05-14
CVE-2024-34712 Oceanic allows unsanitized user input to lead to path traversal in URLs — Oceanic 6.5 Medium2024-05-14
CVE-2024-0549 Relative Path Traversal in mintplex-labs/anything-llm — mintplex-labs/anything-llm 8.1 -2024-04-16
CVE-2024-32005 Local File Inclusion in NiceGUI leaflet component — nicegui 8.2 High2024-04-12
CVE-2024-3025 Path Traversal in mintplex-labs/anything-llm — mintplex-labs/anything-llm 9.1AICriticalAI2024-04-10
CVE-2024-0335 Malformed Packet Handling — Symphony Plus S+ Operations 7.5 High2024-04-03
CVE-2024-20352 Cisco Emergency Responder 安全漏洞 — Cisco Emergency Responder 4.9 Medium2024-04-03
CVE-2024-20310 Cisco Unified Communications Manager 安全漏洞 — Cisco IOS XE Software 6.1 Medium2024-04-03
CVE-2024-25944 Dell OpenManage Enterprise 安全漏洞 — Dell OpenManage Enterprise 5.7 Medium2024-03-29
CVE-2024-24578 RaspberryMatic Unauthenticated Remote Code Execution vulnerability through HMServer File Upload — RaspberryMatic 10.0 Critical2024-03-18
CVE-2024-27770 Unitronics Unistream Unilogic – Versions prior to 1.35.227 CWE-23: Relative Path Traversal — Unistream Unilogic 8.8 High2024-03-18
CVE-2023-6825 File Manager And File Manager Pro (Multiple Versions) - Directory Traversal — File Manager 9.9 Critical2024-03-13
CVE-2024-2053 Artica Proxy Unauthenticated LFI Protection Bypass Vulnerability — Artica Proxy 9.8AICriticalAI2024-03-05
CVE-2024-27199 JetBrains TeamCity 安全漏洞 — TeamCity 7.3 High2024-03-04
CVE-2024-0550 Privileged User using traversal to read system files — mintplex-labs/anything-llm 4.9 -2024-02-28
CVE-2023-42791 Fortinet FortiManager和FortiAnalyzer 安全漏洞 — FortiManager 8.6 High2024-02-20
CVE-2024-22226 Dell Unity 路径遍历漏洞 — Unity 3.3 Low2024-02-12
CVE-2024-24942 JetBrains TeamCity 安全漏洞 — TeamCity 5.3 Medium2024-02-06
CVE-2024-24940 JetBrains IntelliJ IDEA 安全漏洞 — IntelliJ IDEA 2.8 Low2024-02-06
CVE-2024-24938 JetBrains TeamCity 安全漏洞 — TeamCity 5.3 Medium2024-02-06
CVE-2021-22281 Zip Slip Vulnerability in B&R Automation Studio Project Import — Automation Studio 6.3 Medium2024-02-02
CVE-2024-22096 Relative Path Traversal in Rapid SCADA — Rapid SCADA 6.5 Medium2024-02-01
CVE-2024-22415 Unsecured endpoints in the jupyter-lsp server extension — jupyterlab-lsp 7.3 High2024-01-18
CVE-2023-31036 CVE — Triton Inference Server 7.5 High2024-01-12
CVE-2023-50255 Zip Path Traversal in Deepin-Compressor — developer-center 9.3 Critical2023-12-27
CVE-2023-6722 Relative Path Traversal in Repox — Repox 7.5 High2023-12-13
CVE-2023-6307 jeecgboot JimuReport image path traversal — JimuReport 6.3 Medium2023-11-27
CVE-2023-5189 Hub: insecure galaxy-importer tarfile extraction — Red Hat Ansible Automation Platform 2.4 for RHEL 8 6.3 Medium2023-11-14

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