Bug class · Intermediate
Path traversal and file inclusion
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.
- disclosed reports
- 1,809
- median public bounty
- $1,500
- highest public bounty
- $112k
How it works
Full lessonThe pattern behind every report in this class.
Path traversal and file inclusion are the same underlying mistake seen from two angles: a program takes a path or filename from the user and uses it in a file operation without confirming the result stays inside the directory it meant to use. Traversal is the read, write or delete of a file outside that directory; inclusion is the loading of a local file into the running code, often a template, language file or plugin. The evidence covers 1809 reports, 1565 with summaries and 86 paid, so this is a large, well-trodden class rather than a niche one.
Programs care because the consequences are rarely limited to one file. The same flaw turns up in download endpoints, archive extraction, upload handlers, deletion and cleanup routines, and template resolution, and hunters repeatedly chained it to credential disclosure, code execution and full compromise. Reports show traversal reaching runtime logs and configuration files holding plain text credentials and cloud keys, and archive writes landing in startup or autorun locations.
It is most often found wherever a filename or path parameter exists: enterprise download and file-serving actions, AI and ML tooling endpoints for file read, write and delete, Node.js static file servers, VPN portals, SCADA and industrial software, WordPress plugins, and archive extraction for zip, tar, CAB and EPUB. The common thread is a feature that was built to handle files and trusted its input.
The concept is simple. A feature needs a file, so it takes a name or path from the request and joins it onto a base directory. If the input contains parent-directory segments, an absolute path, or a link that points elsewhere, the joined result resolves outside the base. The program then reads, writes, deletes or includes whatever the resolved path names. Nothing exotic is required; the flaw is the absence of a check after resolution.
Things to try
All 1,547Each line worked in a disclosed report. Test only what a program's scope allows.
Download and file-read endpoints 220
- Send a request to a file-handling endpoint with a path that climbs out of the intended directory and check whether the server returns a file listing or file contents instead of an error.
- Test a web application's file parameters with relative path traversal sequences to read files outside the intended directory.
- Request a traversal path from a file-serving endpoint and check whether the system password file comes back.
- As an authenticated user, send a traversal path to the ColdFusion application server endpoint to disclose or delete sensitive files.
File write, copy and delete operations 190
- Use a configuration export or save method with a traversal path to write files to arbitrary locations.
- Send a traversal path to a network config save method and check whether arbitrary files can be overwritten.
- Send a traversal path to a static config save method and check whether files can be written and code executed.
- Craft a source path using forward slashes in an auto-update flow and check whether a file is written outside the temporary installer folder.
Desktop and mobile applications 177
- Build an archive whose entry names contain traversal sequences or absolute paths and open it in the desktop application to see whether files land outside the extraction folder.
- Craft a ZIP whose entry names contain parent-directory segments and open it in a desktop archive viewer to see whether files land outside the extraction folder.
- Package a project as a ZIP with an entry containing traversal sequences, open it in the desktop tool, and check whether a configuration file is written to the user's home directory.
- Restore a crafted backup file in a mobile books app and check whether protected system files can be modified.
Encoding and sanitiser bypasses 108
- Bypass the archive path filter using double URL encoding in entry names and check whether the filter still catches it.
- Submit an archive with backslash traversal sequences to a package validator that only blocks forward slashes and check for writes outside the directory.
- Send percent-encoded traversal sequences to a loader that checks the path before decoding it.
- Try a file extension with a trailing space to slip past an extension blocklist.
Archive extraction and zip-slip 104
- Upload or submit an archive containing entries with traversal sequences or symlinks and check whether files are written outside the extraction directory.
- Upload or supply a ZIP or TAR archive whose entry names contain parent-directory segments and check whether files land outside the extraction directory.
- Open a crafted archive whose entry paths traverse out of the extraction folder and check for writes to startup or system directories.
- Upload an archive whose entry names contain parent-directory segments and check whether files land outside the extraction folder.
Bypasses and variations
All 193- Bypass the existing authentication mechanism before reaching the traversal method.
- Symbolic and hard links inside archives were used to write outside the extraction directory.
- Craft an entry name that begins with the destination directory name so a prefix check without a trailing slash passes and the file lands in a sibling directory.
- Only some path parameters were sanitised, so the unsanitised working-directory parameter was the way around the filter.
- Use double URL encoding to bypass path filtering.
- Prefix a path with a trusted directory and then use parent-directory segments to reach an untrusted location, defeating a raw string prefix check.
Typical fixes
All 98- Resolve the final path and confirm it stays inside the intended directory before any read, write or delete.
- Reject archive entries whose names contain traversal sequences or absolute paths before extraction.
- Detect symlink entries correctly and check the resolved target stays inside the extraction directory before writing or deleting.
- Validate that each archive entry path resolves inside the intended extraction directory before writing.
- Use an allow-list of permitted modules or files instead of passing request values into includes.
- Improve handling and validation of symbolic links before file operations and during restore.
Tips for beginners
All 15- Start with features that obviously handle files: download endpoints taking a filename or path parameter, upload and import handlers, archive extraction, deletion and cleanup routines, and template or language resolution. These are where the evidence concentrates, and a single parameter is often enough to begin.
- Change one parameter at a time from a normal filename to a traversal sequence and compare status, content type and body against the normal request. A response that returns a file listing or file contents instead of an error is the signal. Then request a known sensitive file to confirm the traversal reaches outside the intended folder.
- For archive features, upload or submit an archive whose entry names contain parent-directory segments or symlinks and check whether files are written outside the extraction directory. Test absolute entry names as well as relative traversal, since some tools reject only one. A symlink entry pointing outside the destination is worth trying separately.
- Do not stop at reading a harmless file. Read configuration files and runtime logs and look for database credentials, signing keys, admin credentials or cloud access keys, then show what those credentials unlock. Reports show plain text credentials in logs leading to admin panel access, and pre-authentication reads leading to the credential database and login.
- After confirming traversal, look for a chain to code execution: writing to web-accessible directories, overwriting configuration, or planting a file in a startup or autorun location. A write that lands in a scheduled task or cron drop-in is a much stronger finding than a read, and the evidence supports both.
- Try the bypasses rather than giving up at the first rejection. Use backslashes on Windows-hosted targets, double encoding, nested sequences that survive a strip, an absolute path when traversal is blocked, or a path supplied as a buffer. Compare how the server normalises each form.
Start here: a reading path
Open the pathClear reports in order, easiest first.
-
1
GHSL-2023-054: Unauthenticated arbitrary file read in Jenkins plugin 3.0.12 - CVE-2023-35147Beginner
The plugin takes the file name directly from the request path and appends it to a directory path without validating or sanitising it, allowing path traversal.
-
2
Arris / Arris-variant DSL/Fiber router critical vulnerability exposureBeginner
The server opens the requested file using a pointer that skips the first character of the path, and it does not confine paths to the web root before opening them.
-
3
Lansweeper lansweeper TicketTemplateActions.aspx GetTemplateAttachment directory traversal vulnerabilityBeginner
A directory traversal vulnerability in the GetTemplateAttachment function of Lansweeper allows an authenticated attacker to read arbitrary files on the server by manipulating the fileuid parameter. An attacker could read sensitive files such as web.config, potentially leading to further compromise.
-
4
WWBN AVideo image404Raw.php information disclosure vulnerabilityBeginner
The image404Raw.php script in AVideo takes an attacker-controlled image parameter and uses it to read and serve any file on the server. An attacker can read sensitive files such as videos/configuration.php, which contains the salt used for encryption, potentially leading to administrator privileges.
-
5
[crud-file-server] Path Traversal allows to read arbitrary file from the serverBeginner
The condition checking for '..' uses url.indexOf('..').length, which is always false because indexOf returns a number without a length property, so the removal code never executes.
-
6
Authenticated Arbitrary File Download (Path Traversal)Beginner
The application concatenated user-controlled input directly into a file path without sanitising it, allowing directory traversal.
-
7
GHSL-2023-192_GHSL-2023-194: Several vulnerabilities in bazarr - CVE-2023-50264, CVE-2023-50265, CVE-2023-50266Beginner
Bazarr had two endpoints that took a user-supplied filename and passed it to send_file without validation, allowing unauthenticated arbitrary file reads. A third endpoint took a user-supplied protocol and URL and made a server-side request, allowing blind SSRF to internal and external resources.
-
8
Finding and fixing an arbitrary file-read vulnerability in GitIngest (**CVE-2024–56074)**Beginner
The application did not validate symbolic links, allowing them to point outside the cloned repository and expose arbitrary files.
Guides and techniques
View allThe best explainers, cheat sheets and technique posts on Path traversal, from around the web.
-
Python pitfalls: Turning developer mistakes into vulnerabilitiesDetails exploitable Python pitfalls in os.path.join, urljoin and class pollution, with payloads leading to traversal and RCE.
Technique yeswehack.com
-
Beyond ‘../../’ - a practical guide to path traversal and arbitrary file read attacksPractical walkthrough of path traversal and arbitrary file read, including filter bypasses, valuable file targets and chaining with SSRF.
Explainer yeswehack.com
-
Android security checklist: theft of arbitrary filesOversecured checklist explaining how Android apps leak arbitrary files and how to test for it.
Methodology blog.oversecured.com
-
Bypassing WAFs to Exploit CSPT Using Encoding LevelsDetails client side path traversal and how encoding levels can be abused to bypass WAFs when chaining gadgets.
Technique matanber.com
-
LFI to RCE: Mastering the Step-by-Step Path from File Inclusion to Full Shell AccessWalks through escalating a local file inclusion flaw into remote code execution using log poisoning and wrappers.
Technique medium.com
Highest paid
View allThe biggest public bounties for Path traversal.
-
Remote code execution though vulnerability in Facebook Messenger for Windows (June 2024)Meta Write-up
$111,750 -
Arbitrary file read via the bulk imports UploadsPipelineCritical GitLab HackerOne
$29,000 -
Arbitrary file read via the UploadsRewriter when moving and issueCritical GitLab HackerOne
$20,000 -
5 RCEs in npm for $15,000Write-up
$15,000 -
researchGoogle Write-up
$13,337 -
Path traversal in Nuget Package RegistryHigh GitLab HackerOne
$12,000 -
Path traversal, to RCEHigh GitLab HackerOne
$12,000 -
Analysis of CVE-2019-14994 - Jira Service Desk Path Traversal leads to Massive Information DisclosureAtlassian Write-up
$11,000
Newest reports
All 1,809Most recently disclosed.
-
-
Bosch Rexroth IndraWorks CTAPRJ.ZIP File Parsing Directory Traversal Remote Code Execution VulnerabilityHigh Zero Day Initiative Advisory
-
NVIDIA AIStore Promote API External Control of File Path Information Disclosure VulnerabilityHigh Zero Day Initiative Advisory
-
(Pwn2Own) LM Studio Plugin Sandbox Directory Traversal Arbitrary File Creation VulnerabilityCritical Zero Day Initiative Advisory
-
(Pwn2Own) Oracle Autonomous AI Database Export Directory Exposure of Resource to Wrong Sphere Remote Code Execution VulnerabilityHigh Zero Day Initiative Advisory
-
(Pwn2Own) NVIDIA Megatron Bridge Weight Map Directory Traversal Remote Code Execution VulnerabilityHigh Zero Day Initiative Advisory
-
NVIDIA NeMo Framework nemo File Parsing Directory Traversal Remote Code Execution VulnerabilityHigh Zero Day Initiative Advisory
-
(Pwn2Own) ChargePoint Home Flex uploadsm filetype Link Following Local Privilege Escalation VulnerabilityHigh Zero Day Initiative Advisory
-
NVIDIA AIStore Object Rename Directory Traversal Remote Code Execution VulnerabilityHigh Zero Day Initiative Advisory
-
Bosch Rexroth IndraWorks MTX XIWP File Parsing Directory Traversal Remote Code Execution VulnerabilityHigh Zero Day Initiative Advisory
New Path traversal reports by email
Follow Path traversal and get each week's new disclosures in one short email.