/

CVE-2026-47731

Severity:

CRITICAL RISK

(9.1)

Path Traversal (CWE-22) in AMMOS BSC HTTP Logging API

CVE-2026-47731

Deferred

Vulnerability type

Category:

Path Traversal / Directory Escape

CWE:

CWE-22

Impact:

Arbitrary File Write / Log Injection

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal flaw in the AMMOS Instrument Toolkit Binary Stream Capture (BSC) HTTP API allows remote clients to bypass the configured log root and write data to arbitrary files on the server.

By manipulating path-related form fields when creating capture handlers, an attacker can append controlled content to files anywhere the ait-bsc process can access, making this critical when BSC is reachable over a network or via browser-based requests.

Affected context

The vulnerability arises in deployments using the AIT-Core Binary Stream Capture (BSC) server where the unauthenticated HTTP API for creating packet capture "handlers" is enabled.

It affects environments where:

  • AIT-Core versions prior to 2.6.1 or version 3.1.0 are in use
  • The ait-bsc HTTP endpoint is accessible from a network segment reachable by attackers or by user browsers
  • BSC is configured with a log root directory but does not enforce strict path normalization or validation on client-supplied paths

In these conditions, user-controlled form fields can influence file paths beyond the intended logging directory.

Exploit preconditions

  • Attack surface: The unauthenticated HTTP API exposed by the ait-bsc Binary Stream Capture server.
  • Required access: Network reachability to the BSC HTTP port, either directly (e.g., exposed service, misconfigured firewall) or indirectly via a user's browser that can reach a local or loopback-only service.
  • Client capabilities: Ability to submit HTTP requests with crafted form fields that define handler names or output paths; this can be done by:
  • Directly sending requests to the BSC server from a remote host, or
  • Running attacker-controlled JavaScript in a browser on the same machine or network as BSC (e.g., visiting a malicious or compromised site).
  • Why exploitation is possible: The server trusts client-supplied path-like parameters without robust normalization or restriction to the configured log root, enabling directory traversal and writes outside the intended directory.

Why this happens

The underlying bug stems from improper validation of user-controlled file path components in the BSC HTTP API.

When clients request creation of new packet capture handlers, the service accepts path-related form fields and concatenates them with the configured log root to determine where captured data is written.

Because these inputs are not sanitized for traversal tokens (such as ../) or validated against an allowed directory, the resulting file path may escape the intended log root.

This aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory, where an application fails to constrain paths to a safe base, allowing attackers to traverse the filesystem and write to unintended locations using the privileges of the ait-bsc process.

Potential impact

  • Append attacker-controlled data to arbitrary files accessible by the ait-bsc process.
  • Corrupt or tamper with application or system log files, affecting audit integrity and incident reconstruction.
  • Modify configuration files or data files that are append-tolerant, potentially influencing downstream behavior.
  • Facilitate further compromise if appended data is later interpreted as code, configuration, or commands by other components.
  • Bypass segmentation assumptions by abusing browser-based requests to reach localhost or internal-only services.

General mitigation guidance

Effective mitigation focuses on constraining file paths, reducing trust in client inputs, and hardening network exposure.

Pattern-based defenses include:

  • Canonical path enforcement: Resolve requested paths to an absolute canonical form and verify they remain under a configured base directory before any file operation.
  • Reject traversal sequences: Explicitly deny requests containing .., embedded absolute paths, or path separator tricks in handler or filename fields.
  • Centralized path construction: Derive all file locations server-side from trusted identifiers (e.g., handler IDs) rather than accepting raw paths from clients.
  • Principle of least privilege: Run ait-bsc under an account with restricted filesystem permissions and limit its writable directories to dedicated log locations.
  • Network-level controls: Restrict exposure of the BSC HTTP API to trusted networks, and apply authentication or service-level access controls where feasible.
  • CSRF and browser abuse reduction: Where the API can be reached from browsers, apply CSRF protections and appropriate CORS policies to limit cross-origin request abuse.

How teams detect issues like this

Detection can rely on both code-centric and operational approaches:

  • Static analysis and code review:
  • Flag direct use of user-controlled strings in file open/append operations.
  • Look for path concatenation patterns where inputs from HTTP form fields, query parameters, or JSON bodies are joined with base directories without validation.
  • Enforce secure coding guidelines that require canonical path checks whenever a user input contributes to a filesystem path.
  • Configuration and policy checks:
  • Automated configuration reviews to ensure BSC is not unintentionally exposed to untrusted networks.
  • CI/CD policies that block changes introducing filesystem operations based on untrusted HTTP parameters.
  • Runtime monitoring:
  • File integrity monitoring for critical configuration and log directories to detect unexpected appends originating from the ait-bsc process.
  • HTTP access logs inspection for suspicious handler creation requests containing traversal patterns or unusual path segments.
  • Security tooling:
  • Use SAST tools tailored to Python to identify unsafe path handling.
  • Employ DAST or automated fuzzing of HTTP endpoints to discover path traversal behaviors in test environments.

Sources

SourceLink
github.comgithub.com/NASA-AMMOS/AIT-Core/releases/tag/2.6.1
github.comgithub.com/NASA-AMMOS/AIT-Core/releases/tag/3.1.1
github.comgithub.com/NASA-AMMOS/AIT-Core/security/advisories/GHSA-p462-prxw-mjx4

Frequently asked

questions

The vulnerability can be exploited wherever the BSC HTTP API is reachable, including scenarios where it is only exposed on localhost or a local network.

Attackers can leverage direct network access or induce users to load malicious web pages that send crafted requests from their browser to the BSC service.

No application-level authentication is required in the vulnerable configuration.

The HTTP API for creating handlers is unauthenticated, so network reachability—directly or via a user's browser—is the main prerequisite.

The most robust pattern is to remove direct reliance on client-supplied paths and enforce strict directory constraints.

Construct file paths from trusted server-side identifiers, perform canonicalization checks against a fixed base directory, and reject any request that attempts to escape that directory.

Treat all path-related inputs as untrusted and enforce canonical path validation before file access.

Adopt secure coding guidelines that prohibit passing raw user input into filesystem APIs, apply least-privilege to service accounts, and ensure threat modeling of network-exposed services includes browser-based request abuse and local network attack vectors.

Find out what's already
exploitable in your codebase.