CWE-51: Path Equivalence: '/multiple//internal/slash'
The product accepts path input in the form of multiple internal slash ('/multiple//internal/slash/') without appropriate validation, which can lead to ambiguous path resolution and allow an attacker to traverse the file system to unintended locations or access arbitrary files.
Last updated
Overview
CWE-51 (Path Equivalence: '/multiple//internal/slash') is a variant-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
Common consequences
What can happen when CWE-51 is exploited.
Read Files or Directories, Modify Files or Directories
Affects: Confidentiality, Integrity
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
How to prevent it
Practical mitigations for CWE-51, grouped by where in the lifecycle they apply.
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.
Illustrative examples
Real CVEs that MITRE cites as examples of this weakness.
- CVE-2002-1483 — Read files with full pathname using multiple internal slash.
Terminology & mappings
Mapped taxonomies
- PLOVER: /multiple//internal/slash ('multiple internal slash')
- Software Fault Patterns: Path Traversal (SFP16)
Frequently asked questions
Common questions about CWE-51.
- What is CWE-51?
- The product accepts path input in the form of multiple internal slash ('/multiple//internal/slash/') without appropriate validation, which can lead to ambiguous path resolution and allow an attacker to traverse the file system to unintended locations or access arbitrary files.
- How do you prevent CWE-51?
- 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.
- What are the consequences of CWE-51?
- Exploiting CWE-51 can lead to: Read Files or Directories, Modify Files or Directories.
References
- MITRE CWE definition (CWE-51) (opens in a new tab)
- CWE-51 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Stay ahead of CWE-51
Get alerted the moment a new CWE-51 vulnerability affects your stack, with AI-written analysis, severity context, and remediation guidance.