CVE-2026-12565 Overview
CVE-2026-12565 is a path traversal vulnerability [CWE-22] in the BBOT (Bighuge BLS OSINT Tool) unarchive internal module. The module's archive extraction commands perform no code-level validation on extracted file paths, delegating that responsibility entirely to external tools such as GNU tar. Because extraction behavior varies by platform, systems running GNU tar versions below 1.34 (Ubuntu 20.04, Debian Buster, CentOS 7, and many Docker base images) allow a crafted archive to write files outside the intended extraction directory. While CVE-2025-10284 addressed git-specific remote code execution vectors, the underlying archive extraction path traversal remained unpatched.
Critical Impact
A malicious archive processed by BBOT on a host with an older GNU tar can write attacker-controlled files outside the target directory, leading to integrity compromise and potential code execution.
Affected Products
- BlackLanternSecurity BBOT — unarchive internal module
- Hosts running GNU tar versions earlier than 1.34
- Common base images: Ubuntu 20.04, Debian Buster, CentOS 7
Discovery Timeline
- 2026-06-17 - CVE-2026-12565 published to the National Vulnerability Database (NVD)
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2026-12565
Vulnerability Analysis
The unarchive module in BBOT extracts user-supplied archives encountered during reconnaissance. The extraction logic invokes external utilities (tar, unzip, 7z) and trusts their output destinations without performing independent path validation. GNU tar releases earlier than 1.34 do not strip leading / or resolve .. segments by default, so an archive entry such as ../../etc/cron.d/payload writes outside the expected sandbox directory.
This is a classic Zip Slip-style path traversal [CWE-22] applied to the tar format. The attacker requires the victim to process a malicious archive (user interaction), but no authentication is needed because BBOT routinely fetches and unpacks remote artifacts during scans. Successful exploitation yields arbitrary file write under the BBOT process's user context.
Root Cause
The root cause is missing input validation on archive entry names before delegation to the extraction tool. The previous fix for CVE-2025-10284 scoped its remediation to git-related execution vectors and did not introduce path canonicalization or entry filtering inside bbot/modules/internal/unarchive.py. A related hardening concern in the same patch addresses unsafe pickle deserialization in the module loader cache.
Attack Vector
An adversary hosts or otherwise plants a crafted .tar, .tar.gz, or similar archive that BBOT will retrieve and pass to the unarchive module. When the operator runs a scan on a host with vulnerable GNU tar, extraction writes attacker-controlled paths outside the staging directory. Targets include shell startup files, cron directories, SSH authorized_keys, and CI artifacts.
# Security patch in bbot/modules/internal/unarchive.py
# Adds an extraction size cap as part of the broader hardening
"author": "@domwhewell-sage",
}
_max_extracted_size = 1_000_000_000 # 1 GB
async def setup(self):
self.ignore_compressions = ["application/java-archive", "application/vnd.android.package-archive"]
self.compression_methods = {
# Source: https://github.com/blacklanternsecurity/bbot/commit/4fb38fd6e
# Companion patch in bbot/core/modules.py
# Restricts pickle deserialization in the module preload cache
log = logging.getLogger("bbot.module_loader")
class _SafeUnpickler(pickle.Unpickler):
def find_class(self, module, name):
raise pickle.UnpicklingError(f"Forbidden class: {module}.{name}")
bbot_code_dir = Path(__file__).parent.parent
# Source: https://github.com/blacklanternsecurity/bbot/commit/4fb38fd6e
Detection Methods for CVE-2026-12565
Indicators of Compromise
- Files written outside BBOT's scan output directory, particularly in /etc/cron.d/, ~/.ssh/, or shell rc files, shortly after a scan involving the unarchive module.
- BBOT log entries showing extraction of archives whose member names contain .. or absolute paths.
- Unexpected modifications to files owned by the user running BBOT during or immediately after archive processing.
Detection Strategies
- Audit BBOT scan logs for unarchive module activity correlated with file creations outside the configured output directory.
- Run tar -tf <archive> on captured samples and flag any entry containing .., leading /, or symlink targets pointing outside the archive root.
- Inventory hosts and container images that bundle GNU tar below version 1.34 and mark them as elevated risk for BBOT operations.
Monitoring Recommendations
- Enable file integrity monitoring on cron directories, SSH key paths, and shell profile files on systems running BBOT.
- Capture process telemetry for tar, unzip, and 7z invocations spawned by Python interpreters running BBOT.
- Alert on extraction operations that exceed the new _max_extracted_size cap of 1 GB introduced by the patch.
How to Mitigate CVE-2026-12565
Immediate Actions Required
- Upgrade BBOT to the release that includes commit 4fb38fd6e, which hardens both archive extraction and the preload cache pickle path.
- Upgrade GNU tar to version 1.34 or later on all hosts and container images that run BBOT scans.
- Avoid running BBOT as a privileged user; constrain it to a dedicated low-privilege account with a scoped working directory.
Patch Information
The upstream fix is delivered in the BlackLanternSecurity BBOT repository commit 4fb38fd6e, titled "Harden preload cache pickle and unarchive extraction." The patch introduces a 1 GB extraction ceiling via _max_extracted_size in bbot/modules/internal/unarchive.py and a _SafeUnpickler class in bbot/core/modules.py that blocks arbitrary class resolution during deserialization.
Workarounds
- Disable the unarchive internal module in BBOT configuration until the patched version is deployed.
- Run BBOT inside an ephemeral container or sandbox with no write access to sensitive host paths.
- Pre-screen archives with a wrapper that rejects entries containing .. segments or absolute paths before BBOT processes them.
# Verify GNU tar version and disable the unarchive module as a stopgap
tar --version | head -n1
# Expect: tar (GNU tar) 1.34 or later
# Exclude the unarchive module for a scan
bbot -t targets.txt -em unarchive
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

