Software Securityhome
Fix a findingSearch
Glossary

Path traversal

Input such as ../ escapes the intended directory when an application builds a file path from it (CWE-22). Resolve the full path and check that it stays inside the allowed root.

Also called
directory traversal · Zip Slip
Fix it in your stack
Path traversal fix cards (10 stacks) · CWE-22 page
Defined in
MITRE CWE-22

Covered in

Practice: Path traversal lab: Keep archive entries inside their extraction directory · Path traversal lab: Serve an uploaded file without path traversal · File upload lab: Accept avatars without publishing pages · Local project: Keep extracted files inside their boundary

Find your next answer

Type to search. Search runs in your browser.

Searches run in your browser, but the host can infer them from the index files they load. The address shows your search so you can bookmark or share it.