This vulnerability occurs when an application accepts user input containing absolute file paths (starting with a forward slash like '/etc/passwd') and uses it to access files without proper security checks. Attackers can exploit this to read, write, or delete sensitive files anywhere on the server's filesystem.
Path traversal vulnerabilities using absolute paths are dangerous because they give attackers direct navigation to any location the application can reach. Unlike relative paths ('../'), absolute paths like '/home/user/config.ini' or '/var/log/app.log' point to specific system locations, bypassing intended directory restrictions entirely. This often happens when file operations use unsanitized user input—such as from URL parameters, form fields, or API requests—to construct filesystem paths. To prevent this, developers should avoid using user-supplied input for file operations whenever possible. If file access based on input is required, implement strict allow-listing of permitted paths, normalize and validate inputs against a known safe directory, and run the application with minimal filesystem permissions. Using security mechanisms like chroot jails or sandboxing can also limit the potential damage of a successful attack.
Impact: Read Files or DirectoriesModify Files or Directories
Strategy: Input Validation
Effectiveness: High
Strategy: Input Validation