Path Equivalence: '/multiple/trailing/slash//'

Incomplete Variant
Structure: Simple
Description

This vulnerability occurs when an application accepts file or directory paths containing multiple consecutive forward slashes (like '/multiple/trailing/slash//') without normalizing them. Different systems may interpret these duplicate slashes differently, potentially allowing attackers to bypass security checks and access restricted files or directories.

Extended Description

At its core, this issue stems from inconsistent path resolution. Operating systems, web servers, and programming language libraries often treat '//' within a path differently—some collapse them into a single slash, while others interpret them as a special or even absolute reference. This ambiguity creates a gap between the security logic you write (which checks a 'clean' path) and the actual path the system processes, letting attackers craft inputs that slip through validation. To prevent this, developers should implement strict path normalization before any security or file operations. Always canonicalize user-supplied paths by removing duplicate slashes, resolving relative segments (like '..' and '.'), and then comparing the result against an allowlist of permitted directories. Never trust raw user input for filesystem operations, as this simple oversight can turn into a full directory traversal flaw.

Common Consequences 1
Scope: ConfidentialityIntegrity

Impact: Read Files or DirectoriesModify Files or Directories

Potential Mitigations 1
Phase: Implementation

Strategy: Input Validation

Inputs should be decoded and canonicalized to the application's current internal representation before being validated (Incorrect Behavior Order: Validate Before Canonicalize). Make sure that the application does not decode the same input twice (Double Decoding of the Same Data). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.
Observed Examples 1
CVE-2002-1078Directory listings in web server using multiple trailing slash
Applicable Platforms
Languages:
Not Language-Specific : Undetermined
Modes of Introduction
Implementation
Functional Areas
  1. File Processing
Affected Resources
  1. File or Directory
Taxonomy Mapping
  • PLOVER
  • Software Fault Patterns