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

249 results · Clear filters · Feed

  • High 7.8

    Microsoft Input Method Editor (IME) Elevation of Privilege Vulnerability

    Relative path traversal in Microsoft Input Method Editor (IME) allows an authorized attacker to elevate privileges locally.

  • High 8.8

    Windows Print Spooler Components Elevation of Privilege Vulnerability

    Relative path traversal in Windows Print Spooler Components allows an unauthorized attacker to elevate privileges over a network.

  • High 8.5

    PackageKit/ZYpp local privilege escalation using InstallFiles(SIMULATE)

    A path traversal attack in simulation of actions in the Zypp backend of PackageKit before 1.4.1 could be used by local attackers to gain root privileges.

  • High 7.5

    In JetBrains IntelliJ IDEA before 2026.3 path traversal was possible via unpacking Dev Container archives from a remote…

  • High 8.8

    Network-AI 5.13.4 before 5.15.5 Path Traversal via AgentVCR Cassette Name

    Network-AI from 5.13.4 before 5.15.5 contains a path traversal vulnerability in AgentVCR that allows attackers controlling the cassette name to read or write arbitrary .json files. Attackers can pass traversal sequences to load() or save() to disclose sensiti…

  • High 8.8

    Network-AI 5.13.4 before 5.15.5 Path Traversal via FileJobStore Job ID

    Network-AI from 5.13.4 before 5.15.5 contains a path traversal vulnerability in FileJobStore that allows attackers to read or delete arbitrary .json files by supplying traversal sequences in the job id. Attackers controlling the id passed to FileJobStore.get(…

  • High 8.8

    A vulnerability allowing a member of the Veeam Virtualization Extensions Users group to perform remote code execution (…

  • High 7.5

    HKUDS Vibe-Trading 0.1.0 before 0.1.7 Path Traversal via read_document and safe_user_path

    HKUDS Vibe-Trading from 0.1.0 before 0.1.7 contains a path traversal vulnerability that allows remote attackers to read sensitive server files through LLM agent file-read tools. Attackers can prompt the agent to invoke read_document, which lacks sandbox check…

  • High 7.5

    In JetBrains Datalore before 2026.2.1 unauthenticated path traversal via the report blob endpoint allowed reading arbit…

  • High 7.8

    CVE-2026-110746

    A local privilege escalation vulnerability in TotalAV allows an unprivileged local user to forge the gRPC IPC authentication token, through loading IPC.dll and abuse the SYSTEM service's within TotalAV to execute arbitrary code as NT AUTHORITY\SYSTEM.

  • High 7.3

    Path traversal via logging configuration in P4Search

    P4 Search (formerly Helix Search) allows an authenticated user holding administrative privileges on the connected P4 Server to supply a crafted logging configuration that causes files to be written or deleted outside the intended logging directory. This could…

  • High 8.6

    WebSocket timelapse path traversal and command injection

    A relative path traversal vulnerability has been reported to affect QuMagie. If a remote attacker gains an administrator account, they can then exploit the vulnerability to read the contents of unexpected files or system data. We have already fixed the vulner…

  • High 8.7

    Path Traversal to Root RCE in QNAP Download Station via Addon/Search addon Parameter

    A relative path traversal vulnerability has been reported to affect Download Station. If a remote attacker gains a user account, they can then exploit the vulnerability to read the contents of unexpected files or system data. We have already fixed the vulnera…

  • High 7.5

    Cloud Commander 19.20.2 through 19.21.1 Path Traversal via GET /api/v1/pack

    Cloud Commander (cloudcmd) versions 19.20.2 through 19.21.1 contains a path traversal vulnerability in the GET /api/v1/pack endpoint where the onGET handler at server/rest/index.js:130 calls the unguarded root() function instead of the root.resolve() validati…

  • High 8.8

    Microsoft OpenSSH for Windows Remote Code Execution Vulnerability

    Relative path traversal in OpenSSH for Windows allows an unauthorized attacker to execute code over a network.

  • High 7.8

    Windows Shell Elevation of Privilege Vulnerability

    Relative path traversal in Windows Shell allows an authorized attacker to elevate privileges locally.

  • High 7.8

    Windows Shell Elevation of Privilege Vulnerability

    Relative path traversal in Windows Shell allows an authorized attacker to elevate privileges locally.

  • High 8.8

    Satel Netco Design Relative path traversal

    Satel Netco Design versions prior to v2.1.7 contains a relative path traversal vulnerability in its data export functionality. An authenticated user with Viewer privileges could write attacker influenced content to file system locations accessible to the appl…

  • High 7.3

    Ghost 5.8.0 before 6.34.0 Staff Account Takeover via Admin iframe

    Ghost versions 5.8.0 before 6.34.0 contain an input validation vulnerability in the admin iframe that allows attackers to take over staff user accounts. Attackers with content publishing privileges can craft malicious pages that, when visited by active staff …

  • High 8.5

    Cato Networks SDP Client for Windows is vulnerable to Local Privilege Escalation

    Cato Networks SDP Client for Windows before 6.12.6 allows a local user to delete arbitrary files with SYSTEM privileges via improper validation of a client-supplied SID over a local IPC named pipe.

  • High 8.2

    Fireware OS Path Traversal in WebUI Management Agent Allows Arbitrary Local File Read

    A path traversal vulnerability in the Fireware OS WebUI management agent allows an authenticated administrator to read or list arbitrary files on the local filesystem by sending a specially crafted management request.

  • High 7.5

    HGiga|OAKlouds - Arbitrary File Read

    The OAKlouds developed by HGiga has an Arbitrary File Read vulnerability. Unauthenticated remote attackers can exploit Relative Path Traversal to read arbitrary system files.

  • High 8.4

    uniget: Path Traversal in Hook Files - Directory Escape Vulnerability

    uniget is a universal installer and updater for (container) tools. Prior to 0.27.6, the hooks edit command in cmd/uniget/hooks.go concatenates an unvalidated hook filename with the selected hooks directory, allowing parent-directory components to escape that …

  • High 7.2

    Cisco ISE Arbitrary File Access Vulnerability

    A vulnerability in the REST API of Cisco ISE could allow an authenticated, remote attacker to upload or copy arbitrary files on an affected device. This vulnerability is due to insufficient validation in file operations. An attacker could exploit this vulnera…

  • High 8.1

    Path traversal vulnerability exists in Contec FX5000 series, FX4000 series, and FX3000 series. If this vulnerability is…

  • High 8.1

    Path traversal vulnerability exists in SGA1000. If this vulnerability is exploited, arbitrary files on the server may b…

  • High 8.6

    A directory traversal was identified in Paessler PRTG before 23.4.88.1429 that made it possible to read local files.

  • High 7.1

    Relative path traversal in the generated file manifest cleanup component in projen

    Relative path traversal in the generated file manifest cleanup component in projen before 0.101.37 might allow context-dependent attackers to recursively delete files and directories outside the project directory that are writable by the environment running p…

  • High 7.7

    Path Traversal in Fortra's GoAnywhere MFT Endpoint

    In versions prior to 7.10.2 a path traversal vulnerability in the /attachRemoteFiles endpoint of Fortra's GoAnywhere MFT allows Web Users with both Secure Folders and Secure Mail permissions to escape their sandboxed home directory, achieving arbitrary file r…

  • High 7.0

    Microsoft Power Automate Desktop Elevation of Privilege Vulnerability

    Relative path traversal in Power Automate allows an authorized attacker to elevate privileges locally.

  • High 8.6

    A vulnerability has been identified in SIMOVE Fleetmanager V3.1 (All versions < V3.1.13), SIMOVE Fleetmanager V3.2 (All…

  • High 7.1

    Dell SCG 5.0 Appliance versions prior to 5.36.00.16 and Dell SCG 5.0 Application versions prior to 5.36.00.00, contains…

  • High 7.4

    Dell SCG 5.0 Appliance versions prior to 5.36.00.16 and Dell SCG 5.0 Application versions prior to 5.36.00.00, contains…

  • High 7.4

    Apache Ant: Path traversal in ftp and scp tasks allows arbitrary file write

    The ftp and scp tasks of Apache Ant can download files from a remote server. A malicious server can provide relative paths that allow it to write outside of the dedicated target directory for the download, making it possible to overwrite files of the attacker…

  • High 8.8

    Eclipse aeriOS Self-orchestrator versions prior to 1.2.1 contain a path traversal vulnerability in the REST API. User-c…

  • High 8.8

    Path traversal in the aws:downloadContent plugin in amazon-ssm-agent

    Improper limitation of a pathname to a restricted directory in the aws:downloadContent plugin in amazon-ssm-agent before 3.3.4515.0 might allow an authenticated remote user whose ssm:SendCommand permission is restricted to the AWS-DownloadContent document, to…

  • High 7.1

    Zip Slip Arbitrary File Write in AWS diagram-as-code (awsdac)

    A relative path traversal issue in the zip extraction functionality in AWS diagram-as-code (awsdac) in versions 0.10 through 0.23 can allow a third party to write arbitrary files to the local filesystem via crafted zip entry names containing path traversal se…

  • High 7.5
    CVE-2026-66907 Public exploit

    Apache Camel: Camel-Google-Storage: the consumer appended the remote object name to the configured downloadFileName directory without constraining the result

    Relative path traversal vulnerability in Apache Camel Google Storage component. This issue affects Apache Camel: from 4.0.0 before 4.14.9, from 4.15.0 before 4.18.4, from 4.19.0 before 4.22.0. The camel-google-storage consumer downloads Google Cloud Storage o…

  • High 7.5

    4MOSAn Security Technology|4MOSAn Management Center - Arbitrary File Read

    4MOSAn developed by 4MOSAn Security Technology Co., Ltd. has an Arbitrary File Read vulnerability. Unauthenticated remote attackers can exploit a Relative Path Traversal flaw to download arbitrary system files.

  • High 8.8

    FileWiki has path traversal in RenameAsset via unsanitized oldFilename parameter

    LeafWiki is a self-hosted wiki. Versions 0.3.0 through 0.10.0 have a path traversal vulnerability in LeafWiki’s asset rename functionality. An authenticated user with editor permissions could move files that are accessible to the LeafWiki server process into …