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
- 9.3 Critical severity
Helm-flask-celery: Improper Limitation of a Pathname to a Restricted Directory
The olmax99/helm-flask-celery repository before 2022-05-25 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Modelconverter: Improper Limitation of a Pathname to a Restricted Directory
The ml-inory/ModelConverter repository through 2021-04-26 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Barry Voice Assistant: Improper Limitation of a Pathname to a Restricted Directory
The lyubolp/Barry-Voice-Assistant repository through 2021-01-18 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Hin-eng-preprocessing: Improper Limitation of a Pathname to a Restricted Directory
The kumardeepak/hin-eng-preprocessing repository through 2019-07-16 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Mp-m08-interface: Improper Limitation of a Pathname to a Restricted Directory
The joaopedro-fg/mp-m08-interface repository through 2020-12-10 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Solar-system-simulator: Improper Limitation of a Pathname to a Restricted Directory
The jmcginty15/Solar-system-simulator repository through 2021-07-26 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Ytdl-sync: Improper Limitation of a Pathname to a Restricted Directory
The jaygarza1982/ytdl-sync repository through 2021-01-02 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Pythonweb: Improper Limitation of a Pathname to a Restricted Directory
The echoleegroup/PythonWeb repository through 2018-10-31 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Umbral: Improper Limitation of a Pathname to a Restricted Directory
The decentraminds/umbral repository through 2020-01-15 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Travel Blahg: Improper Limitation of a Pathname to a Restricted Directory
The dankolbman/travel_blahg repository through 2016-01-16 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Monorepo: Improper Limitation of a Pathname to a Restricted Directory
The cinemaproject/monorepo repository through 2021-03-03 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Bonn Activity Maps Annotation Tool: Improper Limitation of a Pathname to a Restricted Directory
The bonn-activity-maps/bam_annotation_tool repository through 2021-08-31 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Flask-file-server: Improper Limitation of a Pathname to a Restricted Directory
The Wildog/flask-file-server repository through 2020-02-20 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Thunderdocs: Improper Limitation of a Pathname to a Restricted Directory
The ThundeRatz/ThunderDocs repository through 2020-05-01 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Pure Swagger: Improper Limitation of a Pathname to a Restricted Directory
The PureStorage-OpenConnect/swagger repository through 1.1.5 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Logstash-management-api: Improper Limitation of a Pathname to a Restricted Directory
The Luxas98/logstash-management-api repository through 2020-05-04 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Python-recipe-database: Improper Limitation of a Pathname to a Restricted Directory
The JustAnotherSoftwareDeveloper/Python-Recipe-Database repository through 2021-03-31 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Fan Platform: Improper Limitation of a Pathname to a Restricted Directory
The Caoyongqi912/Fan_Platform repository through 2021-04-20 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Simple-rat: Improper Limitation of a Pathname to a Restricted Directory
The sergeKashkin/Simple-RAT repository before 2022-05-03 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Mercadoenlineaback: Improper Limitation of a Pathname to a Restricted Directory
The cheo0/MercadoEnLineaBack repository through 2022-05-04 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Baiduwenkuspider Flaskweb: Improper Limitation of a Pathname to a Restricted Directory
The ChangeWeDer/BaiduWenkuSpider_flaskWeb repository before 2021-11-29 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 9.3 Critical severity
Onyxforum: Improper Limitation of a Pathname to a Restricted Directory
The ChaoticOnyx/OnyxForum repository before 2022-05-04 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely.
- 7.5 High severity
Mat2: Improper Limitation of a Pathname to a Restricted Directory
mat2 (aka metadata anonymisation toolkit) before 0.13.0 allows ../ directory traversal during the ZIP archive cleaning process. This primarily affects mat2 web instances, in which clients could obtain sensitive information via a crafted archive.
- 9.1 Critical severity
R1510: Improper Limitation of a Pathname to a Restricted Directory
A data removal vulnerability exists in the web_server /action/remove/ API functionality of Robustel R1510 3.3.0. A specially-crafted network request can lead to arbitrary file deletion. An attacker can send a sequence of requests to trigger this vulnerability.
- 9.1 Critical severity
Product Configurator for WooCommerce: Improper Limitation of a Pathname to a Restricted Directory
The Product Configurator for WooCommerce WordPress plugin before 1.2.32 suffers from an arbitrary file deletion vulnerability via an AJAX action, accessible to unauthenticated users, which accepts user input that is being used in a path and passed to unlink()
- 9.1 Critical severity
https://github.com/concrete5/concrete5: Improper Limitation of a Pathname to a Restricted Directory
Concrete 8.5.7 and below as well as Concrete 9.0 through 9.0.2 allow traversal in /index.php/ccm/system/file/upload which could result in an Arbitrary File Delete exploit. This was remediated by sanitizing /index.php/ccm/system/file/upload to ensure Concrete d
- 9.8 Critical severity
DCMTK: Improper Limitation of a Pathname to a Restricted Directory
OFFIS DCMTK's (All versions prior to 3.6.7) service class user (SCU) is vulnerable to relative path traversal, allowing an attacker to write DICOM files into arbitrary directories under controlled names. This could allow remote code execution.
- 9.8 Critical severity
DCMTK: Improper Limitation of a Pathname to a Restricted Directory
OFFIS DCMTK's (All versions prior to 3.6.7) service class provider (SCP) is vulnerable to path traversal, allowing an attacker to write DICOM files into arbitrary directories under controlled names. This could allow remote code execution.
- 7.5 High severity
Jenkins Embeddable Build Status Plugin: Improper Limitation of a Pathname to a Restricted Directory
Jenkins Embeddable Build Status Plugin 2.0.3 and earlier allows specifying a `style` query parameter that is used to choose a different SVG image style without restricting possible values, resulting in a relative path traversal vulnerability that allows attack
- 7.5 High severity
Jenkins Pipeline: Input Step Plugin: Improper Limitation of a Pathname to a Restricted Directory
Jenkins Pipeline: Input Step Plugin 448.v37cea_9a_10a_70 and earlier archives files uploaded for `file` parameters for Pipeline `input` steps on the controller as part of build metadata, using the parameter name without sanitization as a relative path inside a
- 8.8 High severity
8373 IP Zone Paging Adapter Firmware: Improper Limitation of a Pathname to a Restricted Directory
Algo Communication Products Ltd. 8373 IP Zone Paging Adapter Firmware 1.7.6 allows attackers to perform a directory traversal via a web request sent to /fm-data.lua.
- 7.5 High severity
Remote Desktop Manager: Improper Limitation of a Pathname to a Restricted Directory
A path traversal issue in entry attachments in Devolutions Remote Desktop Manager before 2022.2 allows attackers to create or overwrite files in an arbitrary location.
- 7.5 High severity
github.com/argoproj/argo-events/sensors/artifac…: Improper Limitation of a Pathname to a Restricted Directory
The package github.com/argoproj/argo-events/sensors/artifacts before 1.7.1 are vulnerable to Directory Traversal in the (g *GitArtifactReader).Read() API in git.go. This could allow arbitrary file reads if the GitArtifactReader is provided a pathname containin
- 7.5 High severity
Mathtype: Improper Limitation of a Pathname to a Restricted Directory
Wiris Mathtype v7.28.0 was discovered to contain a path traversal vulnerability in the resourceFile parameter. This vulnerability is exploited via a crafted request to the resource handler.
- 7.5 High severity
T&D Data Server and THERMO RECORDER DATA SERVER: Improper Limitation of a Pathname to a Restricted Directory
Directory traversal vulnerability in T&D Data Server (Japanese Edition) Ver.2.22 and earlier, T&D Data Server (English Edition) Ver.2.30 and earlier, THERMO RECORDER DATA SERVER (Japanese Edition) Ver.2.13 and earlier, and THERMO RECORDER DATA SERVER (English
- 8.8 High severity
Jupiter: Improper Limitation of a Pathname to a Restricted Directory
Vulnerable versions of the Jupiter (<= 6.10.1) and JupiterX (<= 2.0.6) Themes allow logged-in users, including subscriber-level users, to perform Path Traversal and Local File inclusion. In the JupiterX theme, the jupiterx_cp_load_pane_action AJAX action prese
- 7.1 High severity
SupportAssist Client Consumer: Improper Limitation of a Pathname to a Restricted Directory
Dell SupportAssist Client Consumer versions (3.10.4 and versions prior) and Dell SupportAssist Client Commercial versions (3.1.1 and versions prior) contain an arbitrary file deletion/overwrite vulnerability. Authenticated non-admin user could exploit the issu
- 7.1 High severity
SupportAssist Client Commercial: Improper Limitation of a Pathname to a Restricted Directory
Dell SupportAssist Client Consumer versions (3.10.4 and versions prior) and Dell SupportAssist Client Commercial versions (3.1.1 and versions prior) contain an arbitrary file deletion vulnerability. Authenticated non-admin user could exploit the issue and dele
- 9.8 Critical severity
convert-svg-core: Improper Limitation of a Pathname to a Restricted Directory
The package convert-svg-core before 0.6.4 are vulnerable to Directory Traversal due to improper sanitization of SVG tags. Exploiting this vulnerability is possible by using a specially crafted SVG file.
- 9.8 Critical severity
django-s3file: Improper Limitation of a Pathname to a Restricted Directory
django-s3file is a lightweight file upload input for Django and Amazon S3 . In versions prior to 5.5.1 it was possible to traverse the entire AWS S3 bucket and in most cases to access or delete files. If the `AWS_LOCATION` setting was set, traversal was limite