← back to room
LFI
Local File Inclusion
Scenario
PixelVault's viewer loads files from an images directory using a file parameter. Paths are built by concatenating your input onto a base folder. Read sensitive files outside the intended directory.
Your approach
- Request a legitimate image name and observe normal output.
- Try parent-directory segments to climb out of the images folder.
- Target a well-known system file to confirm arbitrary read.
- Locate the lab flag in virtual paths such as flag or a home secret file.
- Submit the flag text you retrieve.
The viewer serves images from /var/www/images/<file>. There is no path sanitisation. Try traversing out, e.g. ?file=../../../../etc/passwd.
Sandbox note: traversal resolves against a simulated filesystem, never the real host.
Sandbox note: traversal resolves against a simulated filesystem, never the real host.
Viewer
// file contents appear here