Jun 18, 2026·7 min read·1 visit
Unauthenticated remote attackers can write arbitrary files and potentially achieve remote code execution via a directory traversal exploit in BBOT's unarchive module when executed on legacy platforms.
CVE-2026-12565 is a medium-severity path traversal (Zip-Slip) vulnerability within the internal unarchive module of the BBOT (Black Lantern Security) OSINT framework. The vulnerability exists due to a failure to validate target paths before extracting archives using host-level command-line utilities. This allows remote, unauthenticated attackers to write arbitrary files outside of the target extraction folder on environments running legacy versions of GNU tar.
The BBOT framework, developed by Black Lantern Security, provides an extensible engine for performing OSINT, domain reconnaissance, and attack surface mapping. During standard execution flow, BBOT crawls remote targets, detects structured web assets, and processes compressed files using its internal unarchive module. This module delegates the extraction tasks to system-level command-line utilities via python subprocess execution pipelines.
This delegation model introduces a significant security exposure. The internal unarchive module fails to inspect or validate the filenames, directory components, and destination paths stored within archive headers prior to invoking extraction utilities. Consequently, the safety of the unarchiving process rests entirely on the extraction behavior of the host operating system's CLI tools.
This lack of local path enforcement allows a directory traversal (Zip-Slip) vulnerability, tracked as CVE-2026-12565 and classified under CWE-22. If a BBOT scan is directed to process a malicious archive hosted on a target server, file paths using directory traversal sequences or nested symbolic links can escape the designated output folder. When executed under legacy extraction utilities, the host operating system writes arbitrary files to locations outside the designated extraction directory.
The root cause of CVE-2026-12565 lies in the complete absence of path sanitization within the unarchive.py module before passing commands to subprocess execution. Because the module directly constructs shell-equivalent execution parameters without analyzing file metadata, it is entirely reliant on the execution host's binary characteristics. Specifically, GNU tar versions earlier than 1.34 exhibit design variances that fail to filter absolute symlinks or relative directory traversal paths.
Under legacy GNU tar configurations, an archive can contain a symbolic link entry pointing to a sensitive system path, followed by a subsequent file entry nested within that symlink's identifier. During extraction, GNU tar first instantiates the symlink on the target filesystem. It then resolves the nested file entry relative to the newly created symlink, writing the payload file into the target directory, such as /etc/cron.d/ or /var/spool/cron/.
In commit 4fb38fd6e77cbf43b198ee8ddbaf380a9eb69d09, developers attempted to secure the unarchive pipeline by enforcing a 1 GB extraction cap. However, this patch is ineffective against the underlying path traversal mechanism. The size check is executed only after the extraction process has finished, introducing a classic Time-of-Check to Time-of-Use (TOCTOU) vulnerability where the malicious payload is written and accessible prior to evaluation.
Furthermore, the validation routine evaluates file sizes by executing output_dir.rglob("*") strictly inside the intended output directory. Because files successfully escaped through directory traversal or absolute symbolic links are placed outside this directory tree, they are not analyzed by the size routine. The check yields an inaccurate byte count, ensuring the bypass of both the size verification logic and the subsequent cleanup functions.
Analyzing the code changes introduced in the flawed patch commit 4fb38fd6e77cbf43b198ee8ddbaf380a9eb69d09 illustrates the architectural oversight. The modification establishes a static limit variable and appends a size validation block immediately following the execution of the subprocess. The vulnerable command generation and post-execution check are structured as follows:
# Vulnerable command generation using external subprocess
command = [s.format(filename=path, extract_dir=output_dir) for s in cmd_list]
try:
# Extracted process is executed without pre-validating archive headers
await self.run_process(command, check=True)
# Post-extraction check introduced in commit 4fb38fd6e77cbf43b198ee8ddbaf380a9eb69d09
extracted_size = sum(f.stat().st_size for f in output_dir.rglob("*") if f.is_file())
if extracted_size > self._max_extracted_size:
# Clean-up only targets output_dir, leaving escaped files untouched
self.helpers.rm_rf(output_dir)
self.warning(
f"Extracted size {extracted_size:,} bytes exceeds limit "
f"({self._max_extracted_size:,} bytes), removing {output_dir}"
)
return FalseThe fundamental defect in this logic is that output_dir.rglob("*") performs a recursive search bounded solely within output_dir. When a path traversal write occurs, files are written to remote locations (e.g., /etc/cron.d/). Because these file paths exist outside the namespace of output_dir, their sizes do not contribute to extracted_size and they remain untouched when self.helpers.rm_rf(output_dir) is executed.
Additionally, this post-extraction design pattern is highly vulnerable to denial of service through storage exhaustion. An attacker can write a file that exceeds the remaining disk space but is less than the 1 GB threshold. If disk space is exhausted mid-extraction, the host system crashes before the sum logic can execute. Thus, the check is bypassed by default.
Exploitation of CVE-2026-12565 requires an attacker to induce a BBOT scan instance to parse an archive containing path-manipulating structures. The attack vector is triggered when BBOT crawls an untrusted endpoint, downloads a compressed file, and triggers the internal unarchive module. The execution succeeds on hosts deploying GNU tar versions less than 1.34.
To construct a functional exploit, the attacker crafts a .tar archive containing two sequentially structured members. The first member is a symbolic link designed to establish a path escape. For instance, the symlink references /etc/cron.d/ or /home/user/.ssh/. The second member defines a nested path resolving through the symlink, containing a functional payload such as a reverse shell or shell configurations.
When GNU tar parses the first entry, it creates the symlink on the filesystem. When it processes the second entry, it resolves the nested filename relative to the symlink and writes the payload file directly to the system directory. The system's standard scheduler (such as cron) subsequently detects and processes the configuration, executing arbitrary commands with the privileges of the active BBOT process.
The impact of CVE-2026-12565 spans from arbitrary local file writes to full remote code execution on the underlying server. Although the CVSS Base Score is calculated at 5.3 (Medium), the practical severity is significantly escalated if BBOT is run under a highly privileged context, such as a root user on a scanner host.
Because the vulnerability allows arbitrary writes to any path accessible by the runner, security controls can be undermined. On default configurations where security tools are run with root privileges, an attacker can modify cron tables, inject keys into SSH directories, or overwrite system libraries. These vectors yield complete administrative compromise of the underlying container or physical machine.
Environmental requirements define the exploit's complexity. If the target system is deployed on modern distributions utilizing GNU tar version 1.34 or higher, the utility inherently restricts file extraction paths from bypassing target directories. However, legacy enterprise setups, container base images (e.g., Ubuntu 20.04 LTS), and specific cloud templates remain vulnerable to remote exploitation.
Remediating CVE-2026-12565 requires mitigating both the system-level behavior and the application-level logic. The most direct system workaround is to upgrade the host's extraction tools. Upgrading GNU tar to version 1.34 or newer enforces default directory barriers, neutralizing the traversal behavior of nested symlinks.
For containerized environments, scanning instances must utilize modern base images (such as Ubuntu 22.04 LTS or Debian Bullseye) and operate under strict privilege boundaries. Restricting write capabilities through a read-only root filesystem (--read-only) prevents writing to arbitrary system paths like /etc/cron.d. In this configuration, only dedicated, non-privileged, transient directories should be writable.
From a development perspective, BBOT must replace external CLI execution commands with robust, path-validated python-native libraries. Developers can safely validate paths before extraction by implementing pre-extraction checks. By resolving every target path to its absolute location and validating that it remains inside the target directory namespace, traversal attempts can be stopped before any disk-writing operations begin.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
BBOT Black Lantern Security | >= 2.3.1, <= 2.8.4 | Post-2.8.4 patch release |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-22 |
| Attack Vector | Network (AV:N) |
| CVSS v3.1 | 5.3 (Medium) |
| EPSS Score | 0.00208 (Percentile: 10.84%) |
| Impact | Arbitrary File Write / Potential Remote Code Execution |
| Exploit Status | Proof of Concept (PoC) |
| CISA KEV Status | Not Listed |
The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize elements such as '..' that can resolve to a location outside of the intended directory.
An unauthenticated Server-Side Request Forgery (SSRF) vulnerability was identified in the Crawl4AI Docker API server before version 0.9.0. The vulnerability exists because the streaming crawl endpoint (/crawl/stream) and the standard crawl endpoint with streaming enabled (/crawl with crawler_config.stream=true) bypass the validate_url_destination security filter. This allows remote, unauthenticated attackers to execute arbitrary HTTP requests targeting internal infrastructure, loopback interfaces, or cloud metadata endpoints like AWS/GCP services.
A Server-Side Request Forgery (SSRF) vulnerability exists in the docker_pull module of Black Lantern Security BBOT. By returning a maliciously crafted WWW-Authenticate header from a rogue Docker registry or executing a Man-in-the-Middle (MitM) attack, an attacker can coerce the BBOT scanner into making arbitrary HTTP requests to internal system services or external infrastructure, potentially disclosing sensitive authorization tokens and host metadata.
CVE-2026-12568 is a path traversal vulnerability (CWE-22) in the postman_download module of BBOT (Babbage Border Obsession Tool) version 2.1.0 through 2.8.5. The vulnerability allows an attacker to perform arbitrary file writes on the local machine running the BBOT scan via a maliciously named remote Postman workspace.
The github_workflows module in BBOT (Black Lantern Security OSINT framework) versions 2.0.0 through 2.8.4 constructs local directory paths from user-controlled repository and owner names without validating for symbolic links. A local attacker sharing the scan directory can pre-plant a symlink at the predictable output path, forcing BBOT to write downloaded workflow artifacts or run logs to an arbitrary location on the filesystem.
An unauthenticated remote memory exhaustion vulnerability in the JLine3 Telnet server allows attackers to crash the host Java Virtual Machine (JVM). The flaw exists in the processing of the NEW-ENVIRON option, where the server accepts an arbitrary number of environment variables without limits, storing them in an unconstrained HashMap. Sending as little as 3.25 MB of payload data can exhaust a standard JVM heap and trigger an OutOfMemoryError. This vulnerability affects applications integrating the remote-telnet module of JLine3.
CVE-2026-49975 describes a high-severity remote Denial of Service (DoS) vulnerability in the Apache HTTP Server's mod_http2 module. Unauthenticated attackers can exploit the HPACK compression and cookie-merging behavior to trigger severe, quadratic memory allocation. This resource exhaustion is maintained by manipulating the HTTP/2 flow-control window, ultimately forcing an Out-of-Memory condition on the server host.