Improper Limitation of a Pathname to a Restricted Directory
CWE-22
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Many file operations are intended to take place within a restricted directory. By using special elements such as.. and / separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the../ sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as /usr/local/bin to access unexpected files. This is referred to as absolute path traversal.
We track 3,611 vulnerabilities of this type. 100% are rated high or critical, and the average CVSS score is 8.3. 98 have been exploited in real attacks.
How this weakness is prevented
- Architecture and Design: For 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.
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
- 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.
- Architecture and Design Operation: Run your code using the lowest privileges that are required to accomplish the necessary tasks. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
- Architecture and Design: When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, 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.
Latest Improper Limitation of a Pathname to a Restricted Directory vulnerabilities
- 8.8 High severity
Titan FTP Server: Improper Limitation of a Pathname to a Restricted Directory
An issue was discovered in TitanFTP through 1.94.1205. The move-file function has a path traversal vulnerability in the newPath parameter. An authenticated attacker can upload any file and then move it anywhere on the server's filesystem.
- 9.1 Critical severity
Ureport: Improper Limitation of a Pathname to a Restricted Directory
ureport v2.2.9 was discovered to contain a directory traversal vulnerability via the deletion function which allows for arbitrary files to be deleted.
- 9.8 Critical severity
Sunflower: Improper Limitation of a Pathname to a Restricted Directory
Sunlogin Sunflower Simplified (aka Sunflower Simple and Personal) 1.0.1.43315 is vulnerable to a path traversal issue. A remote and unauthenticated attacker can execute arbitrary programs on the victim host by sending a crafted HTTP request, as demonstrated by
- 9.8 Critical severity
YugabyteDB Anywhere: Improper Limitation of a Pathname to a Restricted Directory
The High Availability functionality of Yugabyte Anywhere can be abused to write arbitrary files through the backup upload endpoint by using path traversal characters. This vulnerability is associated with program files PlatformReplicationManager.Java. This iss
- 8.1 High severity
OrangeScrum: Improper Limitation of a Pathname to a Restricted Directory
OrangeScrum version 2.0.11 allows an authenticated external attacker to delete arbitrary local files from the server. This is possible because the application uses an unsanitized attacker-controlled parameter to construct an internal path.
- 7.5 High severity
IdentityIQ: Improper Limitation of a Pathname to a Restricted Directory
IdentityIQ 8.3 and all 8.3 patch levels prior to 8.3p2, IdentityIQ 8.2 and all 8.2 patch levels prior to 8.2p5, IdentityIQ 8.1 and all 8.1 patch levels prior to 8.1p7, IdentityIQ 8.0 and all 8.0 patch levels prior to 8.0p6 allow access to arbitrary files in th
- 7.5 High severity
MegaServiSignAdapter: Improper Limitation of a Pathname to a Restricted Directory
ChangingTech MegaServiSignAdapter component has a path traversal vulnerability within its file reading function. An unauthenticated remote attacker can exploit this vulnerability to access arbitrary system files.
- 9.8 Critical severity
EcoStruxure Power Commission: Improper Limitation of a Pathname to a Restricted Directory
A CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability exists in a function that could allow an attacker to create or overwrite critical files that are used to execute code, such as programs or libraries and caus
- 9.8 Critical severity
EcoStruxure Power Commission: Improper Limitation of a Pathname to a Restricted Directory
A CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability exists that could allow an attacker to create or overwrite critical files that are used to execute code, such as programs or libraries and cause unauthentica
- 7.5 High severity
FreshTomato: Improper Limitation of a Pathname to a Restricted Directory
A directory traversal vulnerability exists in the httpd update.cgi functionality of FreshTomato 2022.5. A specially crafted HTTP request can lead to arbitrary file read. An attacker can send an HTTP request to trigger this vulnerability.
- 9.8 Critical severity
Pandora FMS: Improper Limitation of a Pathname to a Restricted Directory
There is a Path Traversal that leads to a Local File Inclusion in Pandora FMS v764. A function is called to check that the parameter that the user has inserted does not contain malicious characteres, but this check is insufficient. An attacker could insert an
- 7.5 High severity
Netmatch-s Ci: Improper Limitation of a Pathname to a Restricted Directory
Italtel NetMatch-S CI 5.2.0-20211008 allows Absolute Path Traversal under NMSCI-WebGui/SaveFileUploader. An unauthenticated user can upload files to an arbitrary path. An attacker can change the uploadDir parameter in a POST request (not possible using the GUI
- 7.5 High severity
Eclipse GlassFish: Improper Limitation of a Pathname to a Restricted Directory
In Eclipse GlassFish versions 5.1.0 to 6.2.5, there is a vulnerability in relative path traversal because it does not filter request path starting with './'. Successful exploitation could allow an remote unauthenticated attacker to access critical data, such a
- 8.1 High severity
QUARTZ-GOLD: Improper Limitation of a Pathname to a Restricted Directory
A directory traversal vulnerability exists in the httpd delfile.cgi functionality of Siretta QUARTZ-GOLD G5.0.1.5-210720-141020. A specially-crafted HTTP request can lead to arbitrary file deletion. An attacker can send an HTTP request to trigger this vulnerab
- 8.8 High severity
QUARTZ-GOLD: Improper Limitation of a Pathname to a Restricted Directory
A file write vulnerability exists in the httpd upload.cgi functionality of Siretta QUARTZ-GOLD G5.0.1.5-210720-141020. A specially-crafted HTTP request can lead to arbitrary file upload. An attacker can send an HTTP request to trigger this vulnerability.
- 8.1 High severity
Hl7 Fhir Core: Improper Limitation of a Pathname to a Restricted Directory
HL7 (Health Level 7) FHIR Core Libraries before 5.6.92 allow attackers to extract files into arbitrary directories via directory traversal from a crafted ZIP or TGZ archive (for a prepackaged terminology cache, NPM package, or comparison archive).
- 7.8 High severity
binwalk: Improper Limitation of a Pathname to a Restricted Directory
A path traversal vulnerability was identified in ReFirm Labs binwalk from version 2.1.2b through 2.3.3 included. By crafting a malicious PFS filesystem file, an attacker can get binwalk's PFS extractor to extract files at arbitrary locations when binwalk is ru
- 7.5 High severity
Business Monitor: Improper Limitation of a Pathname to a Restricted Directory
IBM Business Automation Workflow 22.0.2 could allow a remote attacker to traverse directories on the system. An attacker could send a specially crafted URL request containing "dot dot" sequences (/../) to view arbitrary files on the system. IBM X-Force ID: 239
- 9.8 Critical severity
vRealize Log Insight (vRLI): Improper Limitation of a Pathname to a Restricted Directory
The vRealize Log Insight contains a Directory Traversal Vulnerability. An unauthenticated, malicious actor can inject files into the operating system of an impacted appliance which can result in remote code execution.
- 9.8 Critical severity
My Cloud: Improper Limitation of a Pathname to a Restricted Directory
A vulnerability in the FTP service of Western Digital My Cloud OS 5 devices running firmware versions prior to 5.26.119 allows an attacker to read and write arbitrary files. This could lead to a full NAS compromise and would give remote execution capabilities
- 7.5 High severity
onnx: Improper Limitation of a Pathname to a Restricted Directory
Versions of the package onnx before 1.13.0 are vulnerable to Directory Traversal as the external_data field of the tensor proto can have a path to the file which is outside the model current directory or user-provided directory, for example "../../../etc/passw
- 7.5 High severity
serve-lite: Improper Limitation of a Pathname to a Restricted Directory
All versions of the package serve-lite are vulnerable to Directory Traversal due to missing input sanitization or other checks and protections employed to the req.url passed as-is to path.join().
- 8.8 High severity
Zdir: Improper Limitation of a Pathname to a Restricted Directory
An arbitrary file upload vulnerability in the /api/upload component of zdir v3.2.0 allows attackers to execute arbitrary code via a crafted .ssh file.
- 8.8 High severity
act: Improper Limitation of a Pathname to a Restricted Directory
act is a project which allows for local running of github actions. The artifact server that stores artifacts from Github Action runs does not sanitize path inputs. This allows an attacker to download and overwrite arbitrary files on the host from a Github Acti
- 7.5 High severity
SonicWall SMA1000: Improper Limitation of a Pathname to a Restricted Directory
Pre-authentication path traversal vulnerability in SMA1000 firmware version 12.4.2, which allows an unauthenticated attacker to access arbitrary files and directories stored outside the web root directory.
- 7.5 High severity
Ms 3000 Firmware: Improper Limitation of a Pathname to a Restricted Directory
An issue was discovered in FC46-WebBridge on GE Grid Solutions MS3000 devices before 3.7.6.25p0_3.2.2.17p0_4.7p0. A vulnerability in the web server allows arbitrary files and configurations to be read via directory traversal over TCP port 8888.
- 8.8 High severity
Mailenable: Improper Limitation of a Pathname to a Restricted Directory
Authenticated mail users, under specific circumstances, could add files with unsanitized content in public folders where the IIS user had permission to access. That action, could lead an attacker to store arbitrary code on that files and execute RCE commands.
- 7.5 High severity
FileOrbis File Management System: Improper Limitation of a Pathname to a Restricted Directory
Path Traversal vulnerability in Deytek Informatics FileOrbis File Management System allows Path Traversal. This issue affects FileOrbis File Management System: from unspecified before 10.6.3.
- 9.1 Critical severity
Keycloak: Improper Limitation of a Pathname to a Restricted Directory
keycloak: path traversal via double URL encoding. A flaw was found in Keycloak, where it does not properly validate URLs included in a redirect. An attacker can use this flaw to construct a malicious request to bypass validation and access other URLs and poten
- 7.8 High severity
NVIDIA DGX servers: Unrestricted Upload of File with Dangerous Type
NVIDIA BMC contains a vulnerability in IPMI handler, where an authorized attacker can upload and download arbitrary files under certain circumstances, which may lead to denial of service, escalation of privileges, information disclosure and data tampering.
- 7.8 High severity
NVIDIA DGX servers: Improper Limitation of a Pathname to a Restricted Directory
NVIDIA BMC contains a vulnerability in SPX REST auth handler, where an un-authorized attacker can exploit a path traversal, which may lead to authentication bypass.
- 9.8 Critical severity
Nostromo: Improper Limitation of a Pathname to a Restricted Directory
nhttpd in Nostromo before 2.1 is vulnerable to a path traversal that may allow an attacker to execute arbitrary commands on the remote server. The vulnerability occurs when the homedirs option is used.
- 7.5 High severity
KVM ACR1020A-T: Improper Limitation of a Pathname to a Restricted Directory
Black Box KVM Firmware version 3.4.31307 on models ACR1000A-R-R2, ACR1000A-T-R2, ACR1002A-T, ACR1002A-R, and ACR1020A-T is vulnerable to path traversal, which may allow an attacker to steal user credentials and other sensitive information through local file in
- 8.8 High severity
SINEC INS: Improper Limitation of a Pathname to a Restricted Directory
A vulnerability has been identified in SINEC INS (All versions < V1.0 SP2 Update 1). An authenticated remote attacker with access to the Web Based Management (443/tcp) of the affected product as well as with access to the SFTP server of the affected product (2
- 8.8 High severity
SINEC INS: Improper Limitation of a Pathname to a Restricted Directory
A vulnerability has been identified in SINEC INS (All versions < V1.0 SP2 Update 1). An authenticated remote attacker with access to the Web Based Management (443/tcp) of the affected product, could potentially read and write arbitrary files from and to the de
- 9.8 Critical severity
Automation License Manager V5: Improper Limitation of a Pathname to a Restricted Directory
A vulnerability has been identified in Automation License Manager V5 (All versions), Automation License Manager V6 (All versions < V6.0 SP9 Upd4), TeleControl Server Basic V3 (All versions < V3.1.2). The affected component does not correctly validate the root
- 7.5 High severity
OpenAM Web Policy Agent (OpenAM Consortium…: Improper Limitation of a Pathname to a Restricted Directory
OpenAM Web Policy Agent (OpenAM Consortium Edition) provided by OpenAM Consortium parses URLs improperly, leading to a path traversal vulnerability(CWE-22). Furthermore, a crafted URL may be evaluated incorrectly.
- 7.1 High severity
Zoom for Android: Improper Limitation of a Pathname to a Restricted Directory
Zoom for Android clients before version 5.13.0 contain a path traversal vulnerability. A third party app could exploit this vulnerability to read and write to the Zoom application data directory.
- 9.8 Critical severity
OpenUtau: Improper Limitation of a Pathname to a Restricted Directory
A vulnerability was found in stakira OpenUtau. It has been classified as critical. This affects the function VoicebankInstaller of the file OpenUtau.Core/Classic/VoicebankInstaller.cs of the component ZIP Archive Handler. The manipulation leads to path travers
- 7.5 High severity
HPE OfficeConnect 1820 and 1850 Switch Series: Improper Limitation of a Pathname to a Restricted Directory
A potential security vulnerability has been identified in HPE OfficeConnect 1820, and 1850 switch series. The vulnerability could be remotely exploited to allow remote directory traversal in HPE OfficeConnect 1820 switch series version PT.02.17 and below, HPE