Skip to content
Path traversal Disclosed report Beginner

Path Traversal in AIT-Core BSC Logger via Unauthenticated POST Request

The BSC REST endpoint in AIT-Core v3.0.0 takes a path form parameter and joins it into a log file location without validation, then creates directories there. An unauthenticated attacker with network access to the BSC port could create directories and write PCAP capture files at arbitrary filesystem locations.

Excal1bur Follow

Originally disclosed on Bugcrowd

Critical View original
  • Accepted in 31 days
  • Fixed in 36 days
  • Disclosed after 48 days

Summary by Excal1bur

The Binary Stream Capture (BSC) REST endpoint POST /<n>/start in AIT-Core v3.0.0 accepts a path form parameter that is passed directly to os.path.join() and subsequently to os.makedirs() without any sanitization or validation. Because the BSC server operates with no authentication, any attacker with network access to the BSC port can exploit this to create directories and write PCAP capture files at arbitrary locations on the filesystem.


Affected Component

ait/core/bsc.py — call chain:

_add_logger_by_name() → add_logger() → _get_logger()


Vulnerable Code (Simplified)

# User input passed directly — no sanitization
data = dict(request.forms)
self._logger_manager.add_logger(name, address, conn_type, **data)

# Path joined without validation
if "path" in handler:
    log_file = os.path.join(log_file, handler["path"], filename)

# makedirs called on attacker-controlled path
if not os.path.isdir(os.path.dirname(log_file)):
    os.makedirs(os.path.dirname(log_file))

Proof of Concept

Environment: AIT-Core v3.0.0 · Python 3.10 · Ubuntu 22.04

# 1. Start the BSC server
export AIT_CONFIG=/path/to/AIT-Core/config/config.yaml
export AIT_ROOT=/path/to/AIT-Core
ait-bsc

# 2. Send malicious POST with path traversal payload
curl -X POST "http://localhost:8080/traversal_test/start" \
  --form "port=9999" \
  --form "conn_type=udp" \
  --form "log_dir=/tmp/base" \
  --form "path=../../tmp/pwned_ait"

# 3. Verify — directory created outside intended log_dir
ls /tmp/pwned_ait/

Impact

  • Write files to arbitrary filesystem paths outside the configured log_dir
  • Overwrite or corrupt configuration files in mission operations environments
  • Exhaust disk space on arbitrary partitions (Denial of Service)
  • Degrade forensic/telemetry integrity by scattering PCAP files across the filesystem

The original report as published on Bugcrowd, by Excal1bur. Images and videos are our own copies; raw HTML is shown as text. View it on Bugcrowd.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the user-supplied path is joined to the log directory and passed to directory creation without checking that the result stays inside the intended base folder.

Impact

An attacker could write PCAP files to arbitrary paths, potentially overwrite or corrupt configuration files, exhaust disk space, and degrade forensic integrity; the text does not demonstrate overwriting existing files, only directory creation and capture writing.

What the attacker needed

Network access to the BSC port; no authentication required

How it was found

  1. Start the BSC server with the AIT configuration and root environment variables set.
  2. Send an unauthenticated POST request to the start endpoint for a chosen logger name, including a path value that climbs out of the base directory.
  3. Check the filesystem to confirm the directory was created outside the intended log directory.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A program that records network traffic lets the user say where to save the recording. It pasted that location onto a base folder without checking it, so a value containing '..' steps (which mean 'go up one folder') escaped the intended folder. Because anyone who can reach the service can send the request, they could make the program create folders and write files in places it should never touch.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More by Excal1bur

View all

2 more disclosed reports, best first.

More from National Aeronautics and Space Administration (NASA) - Vulnerability Disclosure Program

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.