This vulnerability, often called directory traversal, occurs when an application builds a file path using user input without properly blocking sequences like '/../'. This lets an attacker break out of the intended directory and access files or folders elsewhere on the server.
At its core, this flaw allows an attacker to manipulate file paths by injecting '../' sequences. When the application doesn't filter these out, the server's filesystem interprets them to move up directories, potentially exposing sensitive configuration files, source code, or user data that should be inaccessible. A common oversight is only checking for '../' at the very start of the input. Attackers can bypass this weak defense by using a leading slash, as in '/../payload'. This simple variation underscores why robust, context-aware validation is needed, not just simple string matching, to fully neutralize path traversal attempts.
Impact: Read Files or DirectoriesModify Files or Directories
Strategy: Input Validation
Strategy: Input Validation