Skip to content
OpenAdvisories

Weakness (CWE)

CWE-23: Relative Path Traversal

Base Draft

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.

How to prevent it (3 mitigations)
  1. Implementation

    Assume 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 of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."

    Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

    When validating filenames, use stringent allowlists that limit the character set to be used. If feasible, only allow a single "." character in the filename to avoid weaknesses such as CWE-23, and exclude directory separators such as "/" to avoid CWE-36. Use a list of allowable file extensions, which will help to avoid CWE-434.

    Do not rely exclusively on a filtering mechanism that removes potentially dangerous characters. This is equivalent to a denylist, which may be incomplete (CWE-184). For example, filtering "/" is insufficient protection if the filesystem also supports the use of "\" as a directory separator. Another possible error could occur when the filtering is applied in a way that still produces dangerous data (CWE-182). For example, if "../" sequences are removed from the ".../...//" string in a sequential fashion, two instances of "../" would be removed from the original string, but the remaining characters would still form the "../" string.

  2. Implementation

    Inputs 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() in C) that produces the canonical version of the pathname, which effectively removes ".." sequences and symbolic links (CWE-23, CWE-59). This includes:

    - realpath() in C

    - getCanonicalPath() in Java

    - GetFullPath() in ASP.NET

    - realpath() or abs_path() in Perl

    - realpath() in PHP

  3. 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 [REF-1481].

Source: MITRE CWE-23

201 results · Clear filters · Feed

  • Medium 4.3

    Tsinghua Unigroup Electronic Archives System exampleDownload.html path traversal

    A vulnerability classified as problematic was found in Tsinghua Unigroup Electronic Archives System 3.2.210802(62532). Affected by this vulnerability is an unknown functionality of the file /setting/ClassFy/exampleDownload.html. The manipulation of the argume…

  • Medium 4.3

    Dahua IPC-HFW1200S Web Interface Sha1Account1 path traversal

    A vulnerability was found in Dahua IPC-HFW1200S, IPC-HFW2300R-Z, IPC-HFW5220E-Z and IPC-HDW1200S up to 20241222. It has been rated as problematic. Affected by this issue is some unknown functionality of the file ../mtd/Config/Sha1Account1 of the component Web…

  • Medium 4.3

    Intelbras VIP S4320 G2 Web Interface Sha1Account1 path traversal

    A vulnerability was found in Intelbras VIP S3020 G2, VIP S4020 G2, VIP S4020 G3 and VIP S4320 G2 up to 20241222. It has been classified as critical. This affects an unknown part of the file ../mtd/Config/Sha1Account1 of the component Web Interface. The manipu…

  • Medium 6.5

    Chunghwa Telecom topm-client - Arbitrary File Read

    The topm-client from Chunghwa Telecom has an Arbitrary File Read vulnerability. The application sets up a simple local web server and provides APIs for communication with the target website. Due to the lack of CSRF protection for the APIs, unauthenticated rem…

  • Medium 4.3

    cjbi wetech-cms Database Backup BackupFileUtil.java backup path traversal

    A vulnerability was found in cjbi wetech-cms 1.0/1.1/1.2. It has been rated as problematic. Affected by this issue is the function backup of the file wetech-cms-master\wetech-basic-common\src\main\java\tech\wetech\basic\util\BackupFileUtil.java of the compone…

  • Medium 6.5

    Microsoft SharePoint Information Disclosure Vulnerability

    Microsoft SharePoint Information Disclosure Vulnerability

  • Medium 4.8

    Multiple relative path traversal vulnerabilities [CWE-23] in Fortinet FortiManager version 7.4.0 through 7.4.2 and befo…

  • Medium 4.9

    TEAMPLUS TECHNOLOGY Team+ - Arbitrary File Move through Path Traversal

    The Team+ from TEAMPLUS TECHNOLOGY does not properly validate a specific page parameter, allowing remote attackers with administrator privileges to move arbitrary system files to the website root directory and access them.

  • Medium 4.4

    Path Traversal in api open_personality_folder in parisneo/lollms-webui

    A path traversal vulnerability exists in the api open_personality_folder endpoint of parisneo/lollms-webui. This vulnerability allows an attacker to read any folder in the personality_folder on the victim's computer, even though sanitize_path is set. The issu…

  • Medium 5.5

    Microsoft Defender for Endpoint for Linux Spoofing Vulnerability

    Relative path traversal in Microsoft Defender for Endpoint allows an authorized attacker to perform spoofing locally.

  • Medium 4.9
    CVE-2024-47949 EPSS 32%

    In JetBrains TeamCity before 2024.07.3 path traversal allowed backup file write to arbitrary location

  • Medium 4.9

    In JetBrains TeamCity before 2024.07.3 path traversal leading to information disclosure was possible via server backups

  • Medium 5.3

    An incorrect limitation of a path to a restricted directory (path traversal) has been detected in Pluck CMS, affecting …

  • Medium 6.5

    Storage bucket Directory Traversal in @backstage/plugin-techdocs-backend

    Backstage is an open framework for building developer portals. When using the AWS S3 or GCS storage provider for TechDocs it is possible to access content in the entire storage bucket. This can leak contents of the bucket that are not intended to be accessibl…

  • Medium 6.5

    Windows Remote Desktop Licensing Service Information Disclosure Vulnerability

    Windows Remote Desktop Licensing Service Information Disclosure Vulnerability

  • Medium 4.9

    CHANGING Mobile One Time Password - Arbitrary File Reading

    CHANGING Mobile One Time Password does not properly filter parameters for the file download functionality, allowing remote attackers with administrator privilege to read arbitrary file on the system.

  • Medium 4.1

    Dell PowerProtect DD, versions prior to 8.0, LTS 7.13.1.0, LTS 7.10.1.30, LTS 7.7.5.40 on DDMC contain a relative path …

  • Medium 6.9

    If exploited an attacker could traverse the file system to access files or directories that would otherwise be inaccess…

  • Medium 4.0

    Path Traversal in parisneo/lollms-webui

    A path traversal vulnerability was identified in the parisneo/lollms-webui repository, specifically within version 9.6. The vulnerability arises due to improper handling of user-supplied input in the 'list_personalities' endpoint. By crafting a malicious HTTP…

  • Medium 6.5

    In JetBrains TeamCity before 2022.04.7, 2022.10.6, 2023.05.6, 2023.11.5, 2024.03.2 path traversal allowing to read file…

  • Medium 6.5

    Oceanic allows unsanitized user input to lead to path traversal in URLs

    Oceanic is a NodeJS library for interfacing with Discord. Prior to version 1.10.4, input to functions such as `Client.rest.channels.removeBan` is not url-encoded, resulting in specially crafted input such as `../../../channels/{id}` being normalized into the …

  • Medium 4.9

    A vulnerability in Cisco Emergency Responder could allow an authenticated, remote attacker to conduct a directory trave…

  • Medium 6.1

    A vulnerability in the web-based interface of Cisco Unified Communications Manager IM & Presence Service (Unified CM IM…

  • Medium 5.7

    Dell OpenManage Enterprise, v4.0 and prior, contain(s) a path traversal vulnerability. An unauthenticated remote attack…

  • Medium 4.9

    An improper Limitation of a Pathname to a Restricted Directory (Path Traversal) vulnerability in SonicWall Email Securi…

  • Medium 4.3

    ZKTeco ZKBio Media Service Port 9999 download path traversal

    A vulnerability was found in ZKTeco ZKBio Media 2.0.0_x64_2024-01-29-1028. It has been classified as problematic. Affected is an unknown function of the file /pro/common/download of the component Service Port 9999. The manipulation of the argument fileName wi…

  • Medium 6.4

    Dependency management path traversal in helm

    Helm is a tool for managing Charts. Charts are packages of pre-configured Kubernetes resources. When either the Helm client or SDK is used to save a chart whose name within the `Chart.yaml` file includes a relative path change, the chart would be saved outsid…

  • Medium 5.3
    CVE-2024-24942 EPSS 32%

    In JetBrains TeamCity before 2023.11.3 path traversal allowed reading data within JAR archives

  • Medium 5.3

    In JetBrains TeamCity before 2023.11.2 limited directory traversal was possible in the Kotlin DSL documentation

  • Medium 6.3

    Zip Slip Vulnerability in B&R Automation Studio Project Import

    : Relative Path Traversal vulnerability in B&R Industrial Automation Automation Studio allows Relative Path Traversal.This issue affects Automation Studio: from 4.0 through 4.12.

  • Medium 6.5

    Relative Path Traversal in Rapid SCADA

    In Rapid Software LLC's Rapid SCADA versions prior to Version 5.8.4, an attacker can append path traversal characters to the filename when using a specific command, allowing them to read arbitrary files from the system.

  • Medium 4.2

    Lif Auth Server vulnerable to uncontrolled data in path expression

    Lif Auth Server is a server for validating logins, managing information, and account recovery for Lif Accounts. The issue relates to the `get_pfp` and `get_banner` routes on Auth Server. The issue is that there is no check to ensure that the file that Auth Se…

  • Medium 6.3

    jeecgboot JimuReport image path traversal

    A vulnerability classified as critical was found in jeecgboot JimuReport up to 1.6.1. Affected by this vulnerability is an unknown functionality of the file /download/image. The manipulation of the argument imageUrl leads to relative path traversal. The attac…

  • Medium 6.3

    Hub: insecure galaxy-importer tarfile extraction

    A path traversal vulnerability exists in Ansible when extracting tarballs. An attacker could craft a malicious tarball so that when using the galaxy importer of Ansible Automation Hub, a symlink could be dropped on the disk, resulting in files being overwritt…

  • Medium 4.4

    A CWE-23: Relative Path Traversal vulnerability exists in Telit Cinterion BGS5, Telit Cinterion EHS5/6/8, Telit Cinteri…

  • Medium 5.0

    Path traversal allows leaking out-of-bound Helm charts from Argo CD repo-server

    Argo CD is a declarative continuous deployment framework for Kubernetes. In Argo CD versions prior to 2.3 (starting at least in v0.1.0, but likely in any version using Helm before 2.3), using a specifically-crafted Helm file could reference external Helm char…

  • Medium 5.8

    Relative Path Traversal in cecilapp/cecil

    Relative Path Traversal in GitHub repository cecilapp/cecil prior to 7.47.1.

  • Medium 6.5

    SmartBPM.NET - Path Traversal

    SmartBPM.NET component has a vulnerability of path traversal within its file download function. An unauthenticated remote attacker can exploit this vulnerability to access arbitrary system files.

  • Medium 6.6

    Visual Studio Code Spoofing Vulnerability

    Visual Studio Code Spoofing Vulnerability

  • Medium 6.2

    A relative path traversal vulnerability [CWE-23] in Fortinet FortiOS version 7.2.0 through 7.2.3, version 7.0.0 through…