# Archivr — Path Traversal (lab)

> Archivr is a document viewer that opens files from a library folder by name. The name-handling is naive, so the viewer can be pointed at files well outside the library.

Canonical: https://codelivly.com/labs/path-traversal

| | |
|---|---|
| Type | Web |
| Difficulty | Beginner |
| Points | 200 |
| Session length | 30 min |
| Completions | 15 |

Archivr is a document viewer that opens files from a library folder by name. The name-handling is naive, so the viewer can be pointed at files well outside the library. Read a file the application was never meant to expose and recover the flag.

## Objective

Learn path (directory) traversal: when a web app builds a file path from user input without confining it, ../ sequences let you climb out of the intended folder and read arbitrary files.

## Tasks

1. Open the viewer
2. Escape the folder
3. Find where secrets live
4. Read the process environment
5. Capture the flag

## Related

- [All labs](https://codelivly.com/practice?type=lab)
