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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-36 (绝对路径遍历) — Vulnerability Class 106

106 vulnerabilities classified as CWE-36 (绝对路径遍历). AI Chinese analysis included.

CWE-36 represents an absolute path traversal weakness where software fails to properly neutralize absolute path sequences, such as "/abs/path," when constructing file paths from external input. Attackers typically exploit this vulnerability by injecting absolute paths into user-controlled parameters, causing the application to resolve file locations outside the intended restricted directory. This allows unauthorized access to sensitive system files or directories that should remain inaccessible. To prevent such exploits, developers must rigorously validate and sanitize all user-supplied path inputs, ensuring they conform to expected formats and remain within designated boundaries. Implementing strict allow-lists for permitted directories and using secure API functions that inherently restrict path resolution can effectively mitigate this risk. Additionally, employing chroot jails or containerization further isolates file access, reducing the impact of any potential traversal attempts.

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 absolute path sequences such as "/abs/path" that can resolve to a location that is outside of that directory. This allows attackers to traverse the file system to access files or directories that are outside of the restricted 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. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mechanism. For example, by reading a password file, the attacker could conduct brute force password guessing a…
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…
Effectiveness: High
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.
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)
In the example below, the path to a dictionary file is read from a system property and used to initialize a File object.
String filename = System.getProperty("com.domain.application.dictionaryFile"); File dictionaryFile = new File(filename);
Bad · Java
This script intends to read a user-supplied file from the current directory. The user inputs the relative path to the file and the script uses Python's os.path.join() function to combine the path to the current working directory with the provided path to the specified file. This results in an absolute path to the desired file. If the file does not exist when the script attempts to read it, an erro…
import os import sys def main(): filename = sys.argv[1] path = os.path.join(os.getcwd(), filename) try: with open(path, 'r') as f: file_data = f.read() except FileNotFoundError as e: print("Error - file not found") main()
Bad · Python
import os import sys def main(): filename = sys.argv[1] path = os.path.normpath(f"{os.getcwd()}{os.sep}{filename}") if path.startswith("/home/cwe/documents/"): try: with open(path, 'r') as f: file_data = f.read() except FileNotFoundError as e: print("Error - file not found") main()
Good · Python
CVE IDTitleCVSSSeverityPublished
CVE-2023-2101 moxi624 Mogu Blog v2 uploadPicsByUrl uploadPictureByUrl absolute path traversal — Mogu Blog v2 4.3 Medium2023-04-15
CVE-2023-1176 Absolute Path Traversal in mlflow/mlflow — mlflow/mlflow 7.1 -2023-03-24
CVE-2022-20958 Cisco BroadWorks CommPilot 代码问题漏洞 — Cisco BroadWorks 8.3 High2022-11-03
CVE-2022-20791 Cisco Unified Communications Products Arbitrary File Read Vulnerability — Cisco Unified Communications Manager 6.5 Medium2022-07-06
CVE-2022-1554 Path Traversal due to `send_file` call in clinical-genomics/scout — clinical-genomics/scout 6.5 -2022-05-03
CVE-2021-34711 Cisco IP Phone Software Arbitrary File Read Vulnerability — Cisco IP Phones with Multiplatform Firmware 5.5 Medium2021-10-06
CVE-2021-1617 Cisco Intersight Virtual Appliance Vulnerabilities — Cisco Intersight Virtual Appliance 6.5 Medium2021-07-22
CVE-2021-1618 Cisco Intersight Virtual Appliance Vulnerabilities — Cisco Intersight Virtual Appliance 6.5 Medium2021-07-22
CVE-2021-21586 Dell Wyse Management Suite 路径遍历漏洞 — Wyse Management Suite 8.1 High2021-07-15
CVE-2021-32507 QSAN Storage Manager - Absolute Path Traversal via FileDownload function — Storage Manager 6.5 Medium2021-07-07
CVE-2021-32506 QSAN Storage Manager - Absolute Path Traversal via GetImage function — Storage Manager 6.5 Medium2021-07-07
CVE-2021-30173 Jun-He Technology Ltd. Quan-Fang-Wei-Tong-Xun system - Local File Inclusion — Quan-Fang-Wei-Tong-Xun system 6.5 Medium2021-05-07
CVE-2021-1296 Cisco Small Business RV160, RV160W, RV260, RV260P, and RV260W VPN Routers Arbitrary File Write Vulnerabilities — Cisco Small Business RV Series Router Firmware 7.5 High2021-02-04
CVE-2021-1297 Cisco Small Business RV160, RV160W, RV260, RV260P, and RV260W VPN Routers Arbitrary File Write Vulnerabilities — Cisco Small Business RV Series Router Firmware 7.5 High2021-02-04
CVE-2018-20250 WinRar 路径遍历漏洞 — WinRAR 9.8 -2019-02-05
CVE-2017-7929 Advantech WebAccess 路径遍历漏洞 — Advantech WebAccess 4.3 -2017-05-06

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