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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-73 (文件名或路径的外部可控制) — Vulnerability Class 315

315 vulnerabilities classified as CWE-73 (文件名或路径的外部可控制). AI Chinese analysis included.

CWE-73 represents a critical input validation weakness where applications allow external actors to dictate file system paths, potentially leading to unauthorized access or modification of sensitive data. Attackers typically exploit this vulnerability through path traversal techniques, injecting sequences like “../” to escape intended directories and reach critical system files or application configurations. This manipulation occurs when software fails to sanitize user-supplied input before using it in filesystem operations, allowing the attacker to bypass intended access controls. To mitigate this risk, developers must implement rigorous input validation, ensuring that all file paths are strictly checked against a whitelist of allowed directories. Additionally, using canonicalization functions to resolve paths before comparison and employing chroot jails can effectively isolate file access, thereby preventing attackers from navigating outside the designated application sandbox.

MITRE CWE Description
The product allows user input to control or influence paths or file names that are used in filesystem operations. This could allow an attacker to access or modify system files or other files that are critical to the application. Path manipulation errors occur when the following two conditions are met: 1. An attacker can specify a path used in an operation on the filesystem. 2. By specifying the resource, the attacker gains a capability that would not otherwise be permitted. For example, the program may give the attacker the ability to overwrite the specified file or run with a configuration controlled by the attacker.
Common Consequences (3)
Integrity, ConfidentialityRead Files or Directories, Modify Files or Directories
The application can operate on unexpected files. Confidentiality is violated when the targeted filename is not directly readable by the attacker.
Integrity, Confidentiality, AvailabilityModify Files or Directories, Execute Unauthorized Code or Commands
The application can operate on unexpected files. This may violate integrity if the filename is written to, or if the filename is for a program or other form of executable code.
AvailabilityDoS: Crash, Exit, or Restart, DoS: Resource Consumption (Other)
The application can operate on unexpected files. Availability can be violated if the attacker specifies an unexpected file that the application modifies. Availability can also be affected if the attacker specifies a filename for a large file, or points to a special device or a file that does not hav…
Mitigations (5)
Architecture and DesignWhen the set of filenames is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames, and reject all other inputs. For example, ID 1 could map to "inbox.txt" and ID 2 could map to "profile.txt". Features such as the ESAPI AccessReferenceMap provide this capability.
Architecture and Design, OperationRun your code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict all access to files within a particular directory. Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection. This may not be a feasible solution, and it only limits the impact to the oper…
Architecture and DesignFor any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
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
ImplementationUse a built-in path canonicalization function (such as realpath() in C) that produces the canonical version of the pathname, which effectively removes ".." sequences and symbolic links (CWE-23, CWE-59).
Examples (2)
The following code uses input from an HTTP request to create a file name. The programmer has not considered the possibility that an attacker could provide a file name such as "../../tomcat/conf/server.xml", which causes the application to delete one of its own configuration files (CWE-22).
String rName = request.getParameter("reportName"); File rFile = new File("/usr/local/apfr/reports/" + rName); ... rFile.delete();
Bad · Java
The following code uses input from a configuration file to determine which file to open and echo back to the user. If the program runs with privileges and malicious users can change the configuration file, they can use the program to read any file on the system that ends with the extension .txt.
fis = new FileInputStream(cfg.getProperty("sub")+".txt"); amt = fis.read(arr); out.println(arr);
Bad · Java
CVE IDTitleCVSSSeverityPublished
CVE-2024-43615 Microsoft OpenSSH for Windows Remote Code Execution Vulnerability — Windows 10 Version 1809 7.1 High2024-10-08
CVE-2024-43581 Microsoft OpenSSH for Windows Remote Code Execution Vulnerability — Windows 10 Version 1809 7.1 High2024-10-08
CVE-2024-38040 BUG-000167984 - Portal for ArcGIS has a Local file inclusion (LFI) vulnerability — Portal for ArcGIS 7.5 High2024-10-04
CVE-2024-9275 jeanmarc77 123solar admin_invt2.php file inclusion — 123solar 6.3 Medium2024-09-27
CVE-2024-9142 Local File Inclusion (LFI) in Olgu Computer Systems' e-Belediye — e-Belediye 8.2AIHighAI2024-09-24
CVE-2024-21545 Proxmox Virtual Environment 安全漏洞 — pve-manager 8.2 High2024-09-24
CVE-2024-7626 WP Delicious – Recipe Plugin for Food Bloggers (formerly Delicious Recipes) <= 1.6.9 - Improper Path Validation to Authenticated (Subscriber+) Arbitrary File Move and Read — WP Delicious – Recipe Plugin for Food Bloggers (formerly Delicious Recipes) 8.1 High2024-09-11
CVE-2024-8517 SPIP Bigup Multipart File Upload OS Command Injection — SPIP 9.8 Critical2024-09-06
CVE-2024-7911 SourceCodester Simple Online Bidding System index.php file inclusion — Simple Online Bidding System 6.3 Medium2024-08-18
CVE-2024-38173 Microsoft Outlook Remote Code Execution Vulnerability — Microsoft Office 2019 6.7 Medium2024-08-13
CVE-2024-38165 Windows Compressed Folder Tampering Vulnerability — Windows 11 version 22H2 6.5 Medium2024-08-13
CVE-2024-7497 itsourcecode Airline Reservation System index.php file inclusion — Airline Reservation System 6.3 Medium2024-08-06
CVE-2024-7496 itsourcecode Airline Reservation System index.php file inclusion — Airline Reservation System 6.3 Medium2024-08-06
CVE-2024-6714 Ubuntu Desktop Provision 安全漏洞 — Ubuntu Desktop Provision 8.8 High2024-07-23
CVE-2024-6937 formtools.org Form Tools Import Option List edit.php curl_exec file inclusion — Form Tools 2.7 Low2024-07-21
CVE-2024-6467 BookingPress Appointment Booking <= 1.1.5 - Authenticated (Subscriber+) Arbitrary File Read to Arbitrary File Creation — Appointment Booking Calendar Plugin and Scheduling Plugin – BookingPress 8.8 High2024-07-17
CVE-2024-39904 Code Execution Vulnerability via Local File Path Traversal in Vnote — vnote 8.8 High2024-07-11
CVE-2024-23317 Gallagher Controller 6000和Gallagher Controller 7000 安全漏洞 — Controller 6000 and Controller 7000 6.3 Medium2024-07-11
CVE-2024-37149 GLPI allows remote code execution through the plugin loader — glpi 7.2 High2024-07-10
CVE-2024-38049 Windows Distributed Transaction Coordinator Remote Code Execution Vulnerability — Windows 10 Version 1809 6.6 Medium2024-07-09
CVE-2024-39303 Weblate vulnerabler to improper sanitization of project backups — weblate 4.4 Medium2024-07-01
CVE-2024-5334 Local File Read in stitionai/devika — stitionai/devika 7.5AIHighAI2024-06-27
CVE-2024-27175 Local File Inclusion — Toshiba Tec e-Studio multi-function peripheral (MFP) 4.4 Medium2024-06-14
CVE-2024-37295 Aimeos Core remote code execution in web server context — aimeos-core 7.2 High2024-06-11
CVE-2024-25975 Arbitrary File Overwrite — HAWKI 8.1AIHighAI2024-05-29
CVE-2024-28826 Unrestricted upload and download paths in check_sftp — Checkmk 8.8 High2024-05-29
CVE-2024-20366 Cisco Crosswork Network Services Orchestrator 安全漏洞 — Cisco Network Services Orchestrator 7.8 High2024-05-15
CVE-2024-27945 Siemens RUGGEDCOM CROSSBOW 安全漏洞 — RUGGEDCOM CROSSBOW 7.2 High2024-05-14
CVE-2024-27944 Siemens RUGGEDCOM CROSSBOW 安全漏洞 — RUGGEDCOM CROSSBOW 7.2 High2024-05-14
CVE-2024-27943 Siemens RUGGEDCOM CROSSBOW 安全漏洞 — RUGGEDCOM CROSSBOW 7.2 High2024-05-14

Vulnerabilities classified as CWE-73 (文件名或路径的外部可控制) represent 315 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.