# Path Traversal

> Hunt directory traversal and archive traversal (ZipSlip/TarSlip) from user input to filesystem operations.

- Skill: `purpleailab/path-traversal` (Agent Skill)
- Install (CLI): `npx skillmds@latest add purpleailab/path-traversal`
- Raw SKILL.md: https://api.skillmd.com/api/skills/purpleailab/path-traversal/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: purpleailab (https://skillmd.com/u/purpleailab)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/purpleailab/path-traversal

---


# Path Traversal Playbook

## Find sinks
- `open(user_path)`, `send_file(user_path)`, file download endpoints, archive extraction APIs.

## Probe payload classes
- Relative traversal: `../../../../etc/passwd`
- Encoded traversal: `%2e%2e%2f`
- Mixed separators: `..\\..\\windows\\win.ini`
- Archive traversal: entries like `../../app/config.py`

## Verify controls
- Canonicalization done before allowlist check.
- Path confinement to intended root.

## Validation
Confirm unauthorized file read/write outside allowed directory with positive and negative controls.

