CWEweakness

CWE-36 Absolute Path Traversal

Official page ↗
Abstraction
Base
Structure
Simple
Status
Draft
Languages
Not Language-Specific, Python
CWE version
5.0

Description

The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize absolute path sequences such as "/abs/path" that can resolve to a location that is outside of that directory.

Common consequences

• Integrity, Confidentiality, Availability: Execute Unauthorized Code or Commands — The attacker may be able to create or overwrite critical files that are used to execute code, such as programs or libraries. • Integrity: Modify Files or Directories — The attacker may be able to overwrite or create critical files, such as programs, libraries, or important data. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mechanism. For example, appending a new account at the end of a password file may allow an attacker to bypass authentication. • Confidentiality: Read Files or Directories — The attacker may be able to read the contents of unexpected files and expose sensitive data. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mechanism. For example, by reading a password file, the attacker could conduct brute force password guessing attacks in order to break into an account on the system. • Availability: DoS: Crash, Exit, or Restart — The attacker may be able to overwrite, delete, or corrupt unexpected critical files such as programs, libraries, or important data. This may prevent the product from working at all and in the case of a protection mechanism such as authentication, it has the potential to lockout every user of the product.

Potential mitigations

• [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. • [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. • [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].

Detection methods

• Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Observed examples

• CVE-2024-0520: Product for managing datasets for AI model training and evaluation allows both relative (CWE-23) and absolute (CWE-36) path traversal to overwrite files via the Content-Disposition header • CVE-2022-31503: Python package constructs filenames using an unsafe os.path.join call on untrusted input, allowing absolute path traversal because os.path.join resets the pathname to an absolute path that is specified as part of the input. • CVE-2002-1345: Multiple FTP clients write arbitrary files via absolute paths in server responses • CVE-2001-1269: ZIP file extractor allows full path • CVE-2002-1818: Path traversal using absolute pathname • CVE-2002-1913: Path traversal using absolute pathname • CVE-2005-2147: Path traversal using absolute pathname • CVE-2000-0614: Arbitrary files may be overwritten via compressed attachments that specify absolute path names for the decompressed output. • CVE-1999-1263: Mail client allows remote attackers to overwrite arbitrary files via an e-mail message containing a uuencoded attachment that specifies the full pathname for the file to be modified. • CVE-2003-0753: Remote attackers can read arbitrary files via a full pathname to the target file in config parameter. • CVE-2002-1525: Remote attackers can read arbitrary files via an absolute pathname. • CVE-2001-0038: Remote attackers can read arbitrary files by specifying the drive letter in the requested URL. • CVE-2001-0255: FTP server allows remote attackers to list arbitrary directories by using the "ls" command and including the drive letter name (e.g. C:) in the requested pathname. • CVE-2001-0933: FTP server allows remote attackers to list the contents of arbitrary drives via a ls command that includes the drive letter as an argument. • CVE-2002-0466: Server allows remote attackers to browse arbitrary directories via a full pathname in the arguments to certain dynamic pages. • CVE-2002-1483: Remote attackers can read arbitrary files via an HTTP request whose argument is a filename of the form "C:" (Drive letter), "//absolute/path", or ".." . • CVE-2004-2488: FTP server read/access arbitrary files using "C:\" filenames • CVE-2001-0687: FTP server allows a remote attacker to retrieve privileged web server system information by specifying arbitrary paths in the UNC format (\\computername\sharename).

Related

Attack pattern · CAPEC (1)

  • CAPEC-597 Absolute Path Traversal attack pattern

Observed example · CVE (18)

  • CVE-2024-0520 A vulnerability in mlflow/mlflow version 8.2.1 allows for remote code execution due to improper neutralization of special elements used in… vulnerability
  • CVE-2022-31503 The orchest/orchest repository before 2022.05.0 on GitHub allows absolute path traversal because the Flask send_file function is used… vulnerability
  • CVE-2005-2147 Trac before 0.8.4 allows remote attackers to read or upload arbitrary files via a full pathname in the id parameter to the (1) upload or… vulnerability
  • CVE-2004-2488 Directory traversal vulnerability in Nexgen FTP Server before 2.2.3.23 allows remote authenticated users to read or list arbitrary files… vulnerability
  • CVE-2003-0753 nphpd.php in newsPHP 216 and earlier allows remote attackers to read arbitrary files via a full pathname to the target file in the… vulnerability
  • CVE-1999-1263 Metamail before 2.7-7.2 allows remote attackers to overwrite arbitrary files via an e-mail message containing a uuencoded attachment that… vulnerability
  • CVE-2002-1483 db4web_c and db4web_c.exe programs in DB4Web 3.4 and 3.6 allow remote attackers to read arbitrary files via an HTTP request whose argument… vulnerability
  • CVE-2002-1525 Directory traversal vulnerability in ASTAware SearchDisk engine for Sun ONE Starter Kit 2.0 allows remote attackers to read arbitrary files… vulnerability
  • CVE-2002-1818 ezhttpbench.php in eZ httpbench 1.1 allows remote attackers to read arbitrary files via a full pathname in the AnalyseSite parameter. vulnerability
  • CVE-2002-1913 phptonuke.php in myPHPNuke 1.8.8 allows remote attackers to read arbitrary files via a full pathname in the filnavn variable. vulnerability
  • CVE-2002-1345 Directory traversal vulnerabilities in multiple FTP clients on UNIX systems allow remote malicious FTP servers to create or overwrite files… vulnerability
  • CVE-2002-0466 Hosting Controller 1.4.1 and earlier allows remote attackers to browse arbitrary directories via a full C: style pathname in the filepath… vulnerability
  • CVE-2001-0933 Cooolsoft PowerFTP Server 2.03 allows remote attackers to list the contents of arbitrary drives via a ls (LIST) command that includes the… vulnerability
  • CVE-2001-0687 Broker FTP server 5.9.5 for Windows NT and 9x allows a remote attacker to retrieve privileged web server system information by (1) issuing… vulnerability
  • CVE-2001-1269 Info-ZIP UnZip 5.42 and earlier allows attackers to overwrite arbitrary files during archive extraction via filenames in the archive that… vulnerability
  • CVE-2001-0255 FaSTream FTP++ Server 2.0 allows remote attackers to list arbitrary directories by using the "ls" command and including the drive letter… vulnerability
  • CVE-2001-0038 Offline Explorer 1.4 before Service Release 2 allows remote attackers to read arbitrary files by specifying the drive letter (e.g. vulnerability
  • CVE-2000-0614 Tnef program in Linux systems allows remote attackers to overwrite arbitrary files via TNEF encoded compressed attachments which specify… vulnerability

Child of · CWE (1)

  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory weakness

Referenced by CAPEC · weakness (1)

  • CAPEC-597 Absolute Path Traversal attack pattern

Referenced by CVE · weakness (149)

  • CVE-2026-118693 CherryTree through 1.7.2 contains a path traversal vulnerability in CtStorageXmlHelper::_create_image_from_xml that trusts unvalidated… vulnerability
  • CVE-2026-70297 Absolute path traversal in Skype for Business and Microsoft Lync allows an authorized attacker to execute code over a network. vulnerability
  • CVE-2026-83683 Absolute path traversal in Windows Encrypting File System (EFS) allows an authorized attacker to disclose information over a network. vulnerability
  • CVE-2026-83746 Absolute path traversal in Skype for Business and Microsoft Lync allows an authorized attacker to elevate privileges over a network. vulnerability
  • CVE-2026-83784 Absolute path traversal in Windows Encrypting File System (EFS) allows an authorized attacker to elevate privileges over a network. vulnerability
  • CVE-2026-55062 uniget is a universal installer and updater for (container) tools. vulnerability
  • CVE-2025-70820 Zettlab D6 Ultra before 1.7.0 allows absolute path traversal to reach folders other than the personal folder. vulnerability
  • CVE-2026-89009 WAVLINK WN535M1 and WN535M3 routers running firmware prior to M35M1_V250922 contain an unauthenticated arbitrary file write vulnerability… vulnerability
  • CVE-2026-68487 Path traversal in Plesk's Backup Manager causes arbitrary file write as root by an authenticated customer. vulnerability
  • CVE-2026-82092 IBM DataStage on Cloud Pak for Data 5.4.0.0 could allow a remote authenticated attacker to obtain sensitive information due to an… vulnerability
  • CVE-2026-88288 GeoVision GV-LPC2211 V1.13 fails to restrict the filename supplied to BKDownloadLink.cgi, allowing a remote user with valid web credentials… vulnerability
  • CVE-2026-68896 Absolute path traversal in Microsoft Windows Search Component allows an authorized attacker to elevate privileges locally. vulnerability
  • CVE-2026-69612 Absolute path traversal in Windows Error Reporting allows an authorized attacker to elevate privileges locally. vulnerability
  • CVE-2026-47606 NVIDIA Triton Inference Server for Linux contains a vulnerability where an attacker could cause an absolute path traversal. vulnerability
  • CVE-2026-47630 NVIDIA Triton Inference Server for Linux contains a vulnerability where an attacker could cause an absolute path traversal. vulnerability
  • CVE-2026-46345 compliance-trestle is a tooling platform for managing compliance as code. vulnerability
  • CVE-2026-47243 Kata Containers is an open source project focusing on a standard implementation of lightweight Virtual Machines (VMs) that perform like… vulnerability
  • CVE-2026-54202 Tobit Laboratories AG TeamDavid's Webbox is vulnerable to a path traversal vulnerability in the archive creation functionality. vulnerability
  • CVE-2026-61891 In Eclipse Theia versions up to and including 1.73.1, the `@theia/filesystem` backend exposes HTTP file-download endpoints (`GET /file`,… vulnerability
  • CVE-2026-13346 pip would incorrectly handle doubly-encoded package URLs from indexes allowing for files to be installed to arbitrary locations on disk… vulnerability
  • CVE-2026-13189 In Progress® Telerik® UI for AJAX prior to v2026.2.708, insufficient validation of the language parameter in the spell check handler may… vulnerability
  • CVE-2026-15302 The ARMember plugin for WordPress is vulnerable to Directory Traversal in all versions up to, and including, 4.0.27 via the 'X-FILENAME'… vulnerability
  • CVE-2026-57211 RabbitMQ is a messaging and streaming broker. vulnerability
  • CVE-2026-58300 Absolute path traversal in Microsoft Edge for Android allows an unauthorized attacker to disclose information locally. vulnerability
  • CVE-2026-49290 Slopsmith is a self-contained web application for browsing, playing, and practicing Rocksmith 2014 Custom DLC (CDLC). vulnerability
  • CVE-2026-53698 Silverpeas through 6.4.6 mishandles the "Personal space" feature that is selected when no componentId is set. vulnerability
  • CVE-2026-10075 DreamMaker developed by Interinfo has a Path Traversal vulnerability, allowing unauthenticated remote attackers to read file names under… vulnerability
  • CVE-2026-10044 Usagi-org ai-goofish-monitor contains an unauthenticated arbitrary file read vulnerability in the GET /api/prompts/{filename} endpoint on… vulnerability
  • CVE-2026-32997 A vulnerability allowing an authenticated user with the Backup Administrator role to write arbitrary files on Linux-based Veeam Backup &… vulnerability
  • CVE-2026-4782 The Avada Builder plugin for WordPress is vulnerable to Arbitrary File Read in all versions up to, and including, 3.15.2 via the… vulnerability
Show all 149 ›

Referenced by CWE · child of (4)

  • CWE-37 Path Traversal: '/absolute/pathname/here' weakness
  • CWE-38 Path Traversal: '\absolute\pathname\here' weakness
  • CWE-39 Path Traversal: 'C:dirname' weakness
  • CWE-40 Path Traversal: '\\UNC\share\name\' (Windows UNC Share) weakness

Referenced by CWE · has member (1)

Referenced by OWASP · mapped cwe (1)

  • A01:2025 Broken Access Control Top 10 2025