On this page
apsyleg1 min read
#portswigger #path-traversal #web-security

File Path Traversal: Bypassing Blocked Traversal Sequences with an Absolute Path

Lab

File path traversal, traversal sequences blocked with absolute path bypass · Apprentice

Solution

Given

This lab contains a path traversal vulnerability in the display of product images.

The application blocks traversal sequences but treats the supplied filename as being relative to a default working directory.

To solve the lab, retrieve the contents of the /etc/passwd file.

Analysis

Everything is the same as the previous lab, except this time we use absolute paths as the bypass.

Recon. Final payload

GET /image?filename=/etc/passwd