Path traversal, often called directory traversal, occurs when an application builds a file path using user input without properly blocking sequences like '../'. This allows an attacker to break out of the intended directory and access files or folders anywhere on the server.
This vulnerability happens because the application fails to validate or sanitize user-supplied input used in file system operations. Attackers can inject sequences like '../' (or their encoded equivalents) to navigate up directory levels, potentially accessing sensitive configuration files, source code, or system credentials that should be off-limits. While the '../' sequence is standard for UNIX-like systems (which use '/' as a separator), the same technique can often bypass protections on Windows servers. Windows primarily uses backslashes ('\\') but frequently accepts forward slashes ('/'), making many applications vulnerable to the same attack pattern if they don't normalize paths correctly before use.
Impact: Read Files or DirectoriesModify Files or Directories
Strategy: Input Validation
Strategy: Input Validation