BaseIncomplete

CWE-41Improper Resolution of Path Equivalence

Category: other

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. 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· 1

  • 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· 3

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

Related CAPEC attack patterns· 1

CAPEC-3

References

  1. https://cwe.mitre.org/data/definitions/41.html

Exploits (incoming)1

TypeTargetConfidenceTier
AttackPatternUsing Leading 'Ghost' Character Sequences to Bypass Input Filterscapec-3100%live

(incoming)3

TypeTargetConfidenceTier
VulnerabilityCVE-2025-21332cve-2025-213320%live
VulnerabilityCVE-2025-24470cve-2025-244700%live
VulnerabilityCVE-2026-5816cve-2026-58160%live

Related by meaning· 6

Nearest entities by semantic similarity across the cs-graph corpus.

CWE
Path Equivalence: 'fakedir/../realdir/filename'
CWE
Path Equivalence: '\multiple\\internal\backslash'
CWE
Path Equivalence: '/multiple//internal/slash'
CWE
Path Equivalence: 'file...name' (Multiple Internal Dot)
CWE
Path Equivalence: '//multiple/leading/slash'
CWE
Path Equivalence: '/multiple/trailing/slash//'
Sourced from MITRE CWE 4.20. Curated for EU compliance use cases by Adam Lundqvist, Founder at SQUR.