CVE-2026-45380 bit7z: Path Traversal via Null Byte Injection from `gcount()` Off-by-One in `restoreSymlink()`
Attackers can craft malicious archives to create symlinks and write arbitrary files outside the extraction directory via an off-by-one error.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2026-45380?
CVE-2026-45380 is a low-severity path traversal vulnerability in rikyoz bit7z, published on 10 Jun 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
bit7z is a cross-platform C++ static library that allows the compression/extraction of archive files. Prior to version 4.0.12, a one-byte off-by-one error in SafeOutPathBuilder::restoreSymlink() allows an attacker to craft a .7z archive that, when extracted with bit7z on any non-Windows platform, creates a symlink escaping the intended output directory. Subsequent archive entries extracted through this symlink write arbitrary files outside the extraction directory with the permissions of the extracting process. This issue has been patched in version 4.0.12.
Which versions are affected by CVE-2026-45380?
How do I fix CVE-2026-45380?
No fix has been published for CVE-2026-45380 yet. Limit exposure of the affected software until one is available.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-45380 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-45380 exists.
Sources
Also known as GHSA-8wj8-9jwv-j24v.