Path Traversal
A flaw that lets an attacker access files outside the intended directory by manipulating file paths.
What it is
Path traversal happens when an application builds a file path from untrusted input without restriction, letting an attacker step outside the intended folder to reach other files on the server. This can expose configuration files, credentials, or source code. In some cases it can be combined with other weaknesses to run code.
Why it matters
It can leak sensitive server files, including secrets and configuration, that should never be accessible to users.
How to fix it
Validate and normalize file paths, reject input containing directory-traversal sequences, and serve files from a fixed location using safe identifiers rather than raw paths.