GHSA-xpf3-p7gm-7756: Path Traversal
BBOT's unarchive module rejects archives containing symlink entries before extraction, but for zip and 7z archives it failed to detect symlinks whose listing carries a DOS-attribute prefix before the unix mode, as produced by legacy versions of p7zip. Such an archive, downloaded and extracted during a scan (for example via filedownload), bypassed the guard and caused an attacker-controlled symlink to be written into the extraction directory. The effect is limited to planting the symlink (its target is not written through), and only hosts using such a legacy p7zip build are affected; current mainline 7-Zip is not.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/bbotto a version that resolves this vulnerability.Fixed in 3.0.0
Event History
Frequently Asked Questions
Which environments are affected?
Only hosts using a legacy p7zip build are affected. Current mainline 7-Zip is not affected.
What does an attacker need to exploit this?
An attacker must cause BBOT to download and extract a crafted ZIP or 7z archive during a scan, such as through the filedownload module. Exploitation also requires user interaction, as reflected by the UI:R vector.
What is the practical impact of successful exploitation?
The attacker can cause an attacker-controlled symlink to be planted in BBOT's extraction directory. The vulnerability does not write through the symlink to its target.
What can be done if BBOT cannot be updated immediately?
Avoid extracting untrusted ZIP and 7z archives during scans on hosts that use legacy p7zip. Using current mainline 7-Zip avoids the affected legacy p7zip behavior.