CWEweakness

CWE-41 Improper Resolution of Path Equivalence

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

Description

The product is vulnerable to file system contents disclosure through path equivalence. Path equivalence involves the use of special characters in file and directory names. The associated manipulations are intended to generate multiple names for the same object.

Extended description

Path equivalence is usually employed in order to circumvent access controls expressed using an incomplete set of file name or file path representations. This is different from path traversal, wherein the manipulations are performed to generate a name for a different object.

Common consequences

• Confidentiality, Integrity, Access Control: Read Files or Directories, Modify Files or Directories, Bypass Protection Mechanism — An attacker may be able to traverse the file system to unintended locations and read or overwrite the contents of unexpected files. If the files are used for a security mechanism than an attacker may be able to bypass the mechanism.

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. • [Implementation] Use and specify an output encoding that can be handled by the downstream component that is reading the output. Common encodings include ISO-8859-1, UTF-7, and UTF-8. When an encoding is not specified, a downstream component may choose a different encoding, either by assuming a default encoding or automatically inferring which encoding is being used, which can be erroneous. When the encodings are inconsistent, the downstream component might treat some character or byte sequences as special, even if they are not special in the original encoding. Attackers might then be able to exploit this discrepancy and conduct injection attacks; they even might be able to bypass protection mechanisms that assume the original encoding is also being used by the downstream component. • [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.

Detection methods

• Automated Static Analysis - Binary or Bytecode: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Bytecode Weakness Analysis - including disassembler + source code weakness analysis • Manual Static Analysis - Binary or Bytecode: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies • Dynamic Analysis with Automated Results Interpretation: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Web Application Scanner • Web Services Scanner • Database Scanners • Dynamic Analysis with Manual Results Interpretation: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Fuzz Tester • Framework-based Fuzzer • Manual Static Analysis - Source Code: According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: • Focused Manual Spotcheck - Focused manual analysis of source • Manual Source Code Review (not inspections) • Automated Static Analysis - Source Code: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Source code Weakness Analyzer • Context-configured Source Code Weakness Analyzer • Architecture or Design Review: According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: • Formal Methods / Correct-By-Construction Cost effective for partial coverage: • Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.)

Observed examples

• CVE-2000-1114: Source code disclosure using trailing dot • CVE-2002-1986: Source code disclosure using trailing dot • CVE-2004-2213: Source code disclosure using trailing dot (CWE-42) or trailing encoded space "%20" (CWE-46) • CVE-2005-3293: Source code disclosure using trailing null (CWE-158) or trailing dot (CWE-42). • CVE-2004-0061: Bypass directory access restrictions using trailing dot in URL • CVE-2000-1133: Bypass directory access restrictions using trailing dot in URL • CVE-2001-1386: Bypass check for ".lnk" extension using ".lnk." • CVE-2001-0693: Source disclosure via trailing encoded space "%20" • CVE-2001-0778: Source disclosure via trailing encoded space "%20" • CVE-2001-1248: Source disclosure via trailing encoded space "%20" • CVE-2004-0280: Source disclosure via trailing encoded space "%20" • CVE-2005-0622: Source disclosure via trailing encoded space "%20" • CVE-2005-1656: Source disclosure via trailing encoded space "%20" • CVE-2002-1603: Source disclosure via trailing encoded space "%20" • CVE-2001-0054: Multi-Factor Vulnerability (MFV). directory traversal and other issues in FTP server using Web encodings such as "%20"; certain manipulations have unusual side effects. • CVE-2002-1451: Trailing space ("+" in query string) leads to source code disclosure. • CVE-2000-0293: Filenames with spaces allow arbitrary file deletion when the product does not properly quote them; some overlap with path traversal. • CVE-2001-1567: "+" characters in query string converted to spaces before sensitive file/extension (internal space), leading to bypass of access restrictions to the file. • CVE-2002-0253: Overlaps infoleak • CVE-2001-0446: Application server allows remote attackers to read source code for .jsp files by appending a / to the requested URL. • CVE-2004-0334: Bypass Basic Authentication for files using trailing "/" • CVE-2001-0893: Read sensitive files with trailing "/" • CVE-2001-0892: Web server allows remote attackers to view sensitive files under the document root (such as .htpasswd) via a GET request with a trailing /. • CVE-2004-1814: Directory traversal vulnerability in server allows remote attackers to read protected files via .. (dot dot) sequences in an HTTP request. • CVE-2002-1483: Read files with full pathname using multiple internal slash. • CVE-1999-1456: Server allows remote attackers to read arbitrary files via a GET request with more than one leading / (slash) character in the filename. • CVE-2004-0578: Server allows remote attackers to read arbitrary files via leading slash (//) characters in a URL request. • CVE-2002-0275: Server allows remote attackers to bypass authentication and read restricted files via an extra / (slash) in the requested URL. • CVE-2004-1032: Product allows local users to delete arbitrary files or create arbitrary empty files via a target filename with a large number of leading slash (/) characters. • CVE-2002-1238: Server allows remote attackers to bypass access restrictions for files via an HTTP request with a sequence of multiple / (slash) characters such as http://www.example.com///file/. • CVE-2004-1878: Product allows remote attackers to bypass authentication, obtain sensitive information, or gain access via a direct request to admin/user.pl preceded by // (double leading slash). • CVE-2005-1365: Server allows remote attackers to execute arbitrary commands via a URL with multiple leading "/" (slash) characters and ".." sequences. • CVE-2000-1050: Access directory using multiple leading slash. • CVE-2001-1072: Bypass access restrictions via multiple leading slash, which causes a regular expression to fail. • CVE-2004-0235: Archive extracts to arbitrary files using multiple leading slash in filenames in the archive. • CVE-2002-1078: Directory listings in web server using multiple trailing slash • CVE-2004-0847: web framework for .NET allows remote attackers to bypass authentication for .aspx files in restricted directories via a request containing a (1) "\" (backslash) or (2) "%5C" (encoded backslash) • CVE-2000-0004: Server allows remote attackers to read source code for executable files by inserting a . (dot) into the URL. • CVE-2002-0304: Server allows remote attackers to read password-protected files via a /./ in the HTTP request. • CVE-1999-1083: Possibly (could be a cleansing error) • CVE-2004-0815: "/./////etc" cleansed to ".///etc" then "/etc" • CVE-2002-0112: Server allows remote attackers to view password protected files via /./ in the URL. • CVE-2004-0696: List directories using desired path and "*" • CVE-2002-0433: List files in web server using "*.ext" • CVE-2001-1152: Proxy allows remote attackers to bypass denylist restrictions and connect to unauthorized web servers by modifying the requested URL, including (1) a // (double slash), (2) a /SUBDIR/.. where the desired file is in the parentdir, (3) a /./, or (4) URL-encoded characters. • CVE-2000-0191: application check access for restricted URL before canonicalization • CVE-2005-1366: CGI source disclosure using "dirname/../cgi-bin" • CVE-1999-0012: Multiple web servers allow restriction bypass using 8.3 names instead of long names • CVE-2001-0795: Server allows remote attackers to obtain source code of CGI scripts via URLs that contain MS-DOS conventions such as (1) upper case letters (CWE-178) or (2) 8.3 file names (CWE-58). • CVE-2005-0471: Multi-Factor Vulnerability. Product generates temporary filenames using long filenames, which become predictable in 8.3 format.

Related

Attack pattern · CAPEC (1)

  • CAPEC-3 Using Leading 'Ghost' Character Sequences to Bypass Input Filters attack pattern

Observed example · CVE (50)

  • CVE-2005-3293 Xerver 4.17 allows remote attackers to (1) obtain source code of scripts via a request with a trailing "." (dot) or (2) list directory… vulnerability
  • CVE-2005-1656 Mercur Messaging 2005 SP2 allows remote attackers to read the source code of .ctml files via a URL with a trailing hex-encoded space… vulnerability
  • CVE-2005-1365 Pico Server (pServ) 3.2 and earlier allows remote attackers to execute arbitrary commands via a URL with multiple leading "/" (slash)… vulnerability
  • CVE-2005-1366 Pico Server (pServ) 3.2 and earlier allows remote attackers to obtain the source code for CGI scripts via "dirname/../cgi-bin" in a URL. vulnerability
  • CVE-2005-0471 Sun Java JRE 1.1.x through 1.4.x writes temporary files with long filenames that become predictable on a file system that uses 8.3 style… vulnerability
  • CVE-2004-1032 fcronsighup in Fcron 2.0.1, 2.9.4, and possibly earlier versions allows local users to delete arbitrary files or create arbitrary empty… vulnerability
  • CVE-2005-0622 RaidenHTTPD 1.1.32, and possibly other versions before 1.1.34, allows remote attackers to view the PHP source code via an HTTP GET request… vulnerability
  • CVE-2004-1814 Directory traversal vulnerability in VocalTec VGW4/8 Gateway 8.0 allows remote attackers to read protected files via .. vulnerability
  • CVE-2004-2213 Mbedthis AppWeb HTTP server before 1.1.3 allows remote attackers to obtain the source code for scripts via a (1) trailing dot (".") or (2)… vulnerability
  • CVE-2004-0578 WinGate 5.2.3 build 901 and 6.0 beta 2 build 942, and other versions such as 5.0.5, allows remote attackers to read arbitrary files via… vulnerability
  • CVE-2004-0280 Caucho Technology Resin 2.1.12 allows remote attackers to view JSP source via an HTTP request to a .jsp file that ends in a "%20" (encoded… vulnerability
  • CVE-2004-0334 InnoMedia VideoPhone allows remote attackers to bypass Basic Authorization via an HTTP request to (1) videophone_admindetail.asp, (2)… vulnerability
  • CVE-2004-0815 The unix_clean_name function in Samba 2.2.x through 2.2.11, and 3.0.x before 3.0.2a, trims certain directory names down to absolute paths,… vulnerability
  • CVE-2004-0847 The Microsoft .NET forms authentication capability for ASP.NET allows remote attackers to bypass authentication for .aspx files in… vulnerability
  • CVE-2004-0235 Multiple directory traversal vulnerabilities in LHA 1.14 allow remote attackers or local users to create arbitrary files via an LHA archive… vulnerability
  • CVE-2004-0696 The ShellExample.cgi script in 4D WebSTAR 5.3.2 and earlier allows remote attackers to list arbitrary directories via a URL with the… vulnerability
  • CVE-2004-1878 LINBOX LIN:BOX allows remote attackers to bypass authentication, obtain sensitive information, or gain access via a direct request to… vulnerability
  • CVE-2004-0061 WWW File Share Pro 2.42 and earlier allows remote attackers to bypass directory access restrictions via (1) a URL with a trailing . 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-1986 Perception LiteServe 2.0 through 2.0.1 allows remote attackers to obtain the source code of CGI scripts via an HTTP request with a trailing… vulnerability
  • CVE-2002-1238 Peter Sandvik's Simple Web Server 0.5.1 and earlier allows remote attackers to bypass access restrictions for files via an HTTP request… vulnerability
  • CVE-2002-1078 Abyss Web Server 1.0.3 allows remote attackers to list directory contents via an HTTP GET request that ends in a large number of / (slash)… vulnerability
  • CVE-2002-1451 Blazix before 1.2.2 allows remote attackers to read source code of JSP scripts or list restricted web directories via an HTTP request that… vulnerability
  • CVE-2002-0433 Pi3Web 2.0.0 allows remote attackers to view restricted files via an HTTP request containing a "*" (wildcard or asterisk) character. vulnerability
  • CVE-2002-0275 Falcon web server 2.0.0.1020 and earlier allows remote attackers to bypass authentication and read restricted files via an extra / (slash)… vulnerability
  • CVE-2002-0304 Lil HTTP Server 2.1 allows remote attackers to read password-protected files via a /./ in the HTTP request. vulnerability
  • CVE-2002-0253 PHP, when not configured with the "display_errors = Off" setting in php.ini, allows remote attackers to obtain the physical path for an… vulnerability
  • CVE-2002-0112 Etype Eserv 2.97 allows remote attackers to view password protected files via /./ in the URL. vulnerability
  • CVE-2002-1603 GoAhead Web Server 2.1.7 and earlier allows remote attackers to obtain the source code of ASP files via a URL terminated with a /, \, %2f… vulnerability
  • CVE-2001-1567 Lotus Domino server 5.0.9a and earlier allows remote attackers to bypass security restrictions and view Notes database files and possibly… vulnerability
Show all 50 ›

Can precede · CWE (2)

  • CWE-1390 Weak Authentication weakness
  • CWE-863 Incorrect Authorization weakness

Child of · CWE (1)

  • CWE-706 Use of Incorrectly-Resolved Name or Reference weakness

Referenced by CAPEC · weakness (1)

  • CAPEC-3 Using Leading 'Ghost' Character Sequences to Bypass Input Filters attack pattern

Referenced by CVE · weakness (41)

  • CVE-2026-112343 Syncplify Server! vulnerability
  • CVE-2026-110095 fast-uri is a dependency-free RFC 3986 URI parser and serializer for Node.js. vulnerability
  • CVE-2026-110725 fast-uri is a dependency-free RFC 3986 URI parser and serializer for Node.js. vulnerability
  • CVE-2026-102217 Improper resolution of path equivalence in WebDAV allows an authorized attacker to elevate privileges over a network. vulnerability
  • CVE-2026-102231 Improper resolution of path equivalence in Visual Studio Code allows an unauthorized attacker to bypass a security feature locally. vulnerability
  • CVE-2026-108463 Improper resolution of path equivalence in Windows SmartScreen allows an unauthorized attacker to bypass a security feature over a network. vulnerability
  • CVE-2026-70184 Improper resolution of path equivalence in Windows Backup Engine allows an authorized attacker to elevate privileges locally. vulnerability
  • CVE-2026-88136 Improper resolution of path equivalence in WebDAV allows an authorized attacker to execute code over a network. vulnerability
  • CVE-2026-93709 Dancer2 versions before 2.2.0 for Perl serve a layout as a page when an equivalent spelling of its path misses the guard in the AutoPage… vulnerability
  • CVE-2026-57441 MCPVault is a lightweight Model Context Protocol server for safe access to files in an Obsidian vault. vulnerability
  • CVE-2026-85978 An unauthenticated remote code execution vulnerability exists in the Policy Manager console of Akana API Platform. vulnerability
  • CVE-2026-73019 Improper resolution of path equivalence in Windows URL Moniker allows an unauthorized attacker to bypass a security feature over a network. vulnerability
  • CVE-2026-72835 filebrowser versions before v2.63.21 fail to canonicalize paths before evaluating access rules, allowing authenticated users to bypass… vulnerability
  • CVE-2026-66064 goshs is a feature-rich single-binary file server for red teamers and developers. vulnerability
  • CVE-2026-49401 Deno is a JavaScript, TypeScript, and WebAssembly runtime. vulnerability
  • CVE-2026-50568 Fission is an open-source, Kubernetes-native serverless framework that simplifies the deployment of functions and applications on… vulnerability
  • CVE-2026-5816 GitLab has remediated an issue in GitLab CE/EE affecting all versions from 18.10 before 18.10.4 and 18.11 before 18.11.1 that could have… vulnerability
  • CVE-2026-34510 OpenClaw before 2026.3.22 contains a path traversal vulnerability in Windows media loaders that accepts remote-host file URLs and UNC-style… vulnerability
  • CVE-2026-34451 Claude SDK for TypeScript provides access to the Claude API from server-side TypeScript or JavaScript applications. vulnerability
  • CVE-2026-23674 Improper resolution of path equivalence in Windows MapUrlToZone allows an unauthorized attacker to bypass a security feature over a network. vulnerability
  • CVE-2025-58290 Denial of service (DoS) vulnerability in the office service. vulnerability
  • CVE-2025-43298 A parsing issue in the handling of directory paths was addressed with improved path validation. vulnerability
  • CVE-2025-54107 Improper resolution of path equivalence in Windows MapUrlToZone allows an unauthorized attacker to bypass a security feature over a network. vulnerability
  • CVE-2024-6839 corydolphin/flask-cors version 4.0.1 contains an improper regex path matching vulnerability. vulnerability
  • CVE-2024-8765 In lunary-ai/lunary, the privilege check mechanism is flawed in version git afc5df4. vulnerability
  • CVE-2025-0115 A vulnerability in the Palo Alto Networks PAN-OS software enables an authenticated admin on the PAN-OS CLI to read arbitrary files. vulnerability
  • CVE-2025-21247 Improper resolution of path equivalence in Windows MapUrlToZone allows an unauthorized attacker to bypass a security feature over a network. vulnerability
  • CVE-2025-24470 An Improper Resolution of Path Equivalence vulnerability [CWE-41] in FortiPortal 7.4.0 through 7.4.2, 7.2.0 through 7.2.6, 7.0.0 through… vulnerability
  • CVE-2025-21189 MapUrlToZone Security Feature Bypass Vulnerability vulnerability
  • CVE-2025-21219 MapUrlToZone Security Feature Bypass Vulnerability vulnerability
Show all 41 ›

Referenced by CWE · can precede (3)

  • CWE-172 Improper Encoding or Decoding of Data weakness
  • CWE-20 Improper Input Validation weakness
  • CWE-73 External Control of File Name or Path weakness

Referenced by CWE · child of (15)

  • CWE-42 Path Equivalence: 'filename.' (Trailing Dot) weakness
  • CWE-44 Path Equivalence: 'file.name' (Internal Dot) weakness
  • CWE-46 Path Equivalence: 'filename ' (Trailing Space) weakness
  • CWE-47 Path Equivalence: ' filename' (Leading Space) weakness
  • CWE-48 Path Equivalence: 'file name' (Internal Whitespace) weakness
  • CWE-49 Path Equivalence: 'filename/' (Trailing Slash) weakness
  • CWE-50 Path Equivalence: '//multiple/leading/slash' weakness
  • CWE-51 Path Equivalence: '/multiple//internal/slash' weakness
  • CWE-52 Path Equivalence: '/multiple/trailing/slash//' weakness
  • CWE-53 Path Equivalence: '\multiple\\internal\backslash' weakness
  • CWE-54 Path Equivalence: 'filedir\' (Trailing Backslash) weakness
  • CWE-55 Path Equivalence: '/./' (Single Dot Directory) weakness
  • CWE-56 Path Equivalence: 'filedir*' (Wildcard) weakness
  • CWE-57 Path Equivalence: 'fakedir/../realdir/filename' weakness
  • CWE-58 Path Equivalence: Windows 8.3 Filename weakness

Referenced by CWE · has member (1)

Referenced by CWE · peer of (2)

  • CWE-1289 Improper Validation of Unsafe Equivalence in Input weakness
  • CWE-551 Incorrect Behavior Order: Authorization Before Parsing and Canonicalization weakness