Path Traversal

High

Path Traversal / Directory Traversal

Definition

Path Traversal is a vulnerability that lets an attacker access files and directories outside the application's root directory using sequences like ../. The attacker can read sensitive operating-system files, the application's source code or configuration files containing credentials.

Impact

Reading sensitive system files (/etc/passwd, /etc/shadow)Access to source code and configuration filesObtaining database and API credentialsCombined with upload, possible remote code execution

Examples

Basic Path Traversal

Using ../ sequences the attacker climbs levels in the filesystem until reaching the root and accessing system files. The bypasses use double encoding or alternative sequences when filters are present.

# Legitimate request
GET /api/files?name=report.pdf

# Path Traversal attack
GET /api/files?name=../../../etc/passwd

# Common filter bypasses
GET /api/files?name=....//....//....//etc/passwd
GET /api/files?name=%2e%2e%2f%2e%2e%2f%2e%2e%2fetc%2fpasswd
GET /api/files?name=..%252f..%252f..%252fetc%252fpasswd

Practice Path Traversal with real labs

Apply what you've learned in safe environments based on real bug bounty reports.

See practice labs
2,482

hunters training

62

labs from real hacks

1,630

completions

$14,790

paid out for these bugs

11 flags captured this week·Real hacks from HackerOne · YesWeHack · Bugcrowd·No commitment·Free Academy
Free · no account

The checklist I run on every new target

47 checks ordered by cost: first what can get you in trouble, then the cheap stuff, and finally the expensive stuff — which is where the big bounties are. I'll send it to your inbox right now.

Unsubscribe in one click, from any email.

BBLabs · bug bounty training

Stop reading about bugs and start hunting them

Create your free account and practice on labs based on real hacks that paid out thousands of euros. The Academy is free forever.

No card · free Academy · cancel anytime