Lab: File path traversal, traversal sequences blocked with absolute path bypass

PRACTITIONER

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.

Solution

  1. Use Burp Suite to intercept and modify a request that fetches a product image.
  2. Modify the filename parameter, giving it the value /etc/passwd.
  3. Observe that the response contains the contents of the /etc/passwd file.

Community solutions

Rana Khalil
z3nsh3ll
Intigriti
Michael Sommer