Skip to content

Repository files navigation

Traverser

PythonSecurityWebLicense

Traverser is a Python-based utility for detecting Path Traversal vulnerabilities in web applications.
It automates payload injection and request handling to help identify improper file path validation.

Features

  • Evidence-based Path Traversal vulnerability detection
  • Custom wordlist support and built-in payload profiles
  • Steady concurrent HTTP requests with session reuse
  • Flexible payload placement in URLs, query params, headers, path segments, and POST bodies
  • JSON or human-readable output

Requirements

  • Python 3.13 or newer

Installation

git clone https://github.com/ethercod3/traverser.git
cd traverser
python -m venv .venv

Activate the virtual environment

Windows

.venv\Scripts\activate

Linux / macOS

source .venv/bin/activate

Install dependencies

pip install -e .

For development:

pip install -e ".[dev]"

Usage

Example

traverser \
-u "https://localhost:8000/image?filename={INSERT_PAYLOAD}" \
-t /etc/passwd \
-p "{INSERT_PAYLOAD}" \
--simultaneous-requests 5 \
--profile linux

Command-line Arguments

ShortLongRequiredDescriptionDefault
-u--urlYesTarget URL
-t--targetYes*Target file path on the server. Can be repeated
--target-fileNoFile with one target path per line
-w--wordlistNoPath to payload wordlist./default.wordlist
-h--headerNoAdditional HTTP header(s)
-sr--simultaneous-requestsNoMaximum number of concurrent requests1
-p--placeNoPayload placeholder string<>
-ss--success-statusesNoSuccessfull HTTP statuses200-400
--timeoutNoTotal request timeout in seconds10.0
--retriesNoRetries for transient connection failures0
--follow-redirects / --no-follow-redirectsNoEnable or disable redirect followingfollow
--profileNoBuilt-in payload profile: linux, windows, encoded, double-encoded, mixed-separator
--min-depth / --max-depthNoTraversal depth range for generated payloads1 / 6
--query-paramNoPlace payload in a query parameter
--path-segmentNoPlace payload as a URL path segment
--header-valueNoPlace payload in the named header
--post-bodyNoSend payload as a POST body
--jsonNoEmit JSON findingsFalse
--outputNoWrite findings to a file
--stop-on-firstNoStop after first high-confidence findingFalse
--max-findingsNoStop after N findings
-v--verboseNoDisplay verbose infoFalse

*At least one --target or --target-file entry is required.

Multiple headers example

-h "Authorization: Bearer TOKEN" \
-h "X-Custom-Header: value"

Multiple ranges of the successfull HTTP statuses example

-ss "200-202" \
-ss "302"

Second number of the range is excluded. Result status codes will be (200, 201, 302).

Development checks

python -m pytest
python -m ruff check .

Demo target

Run a local mock target and print a sample scan report:

uv run example

About

Python-based utility for detecting Path Traversal vulnerabilities in web applications

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages