CVE-2026-45380

bit7z: Path Traversal via Null Byte Injection from `gcount()` Off-by-One in `restoreSymlink()`

Published Jun 10, 2026 CVSS 3.1 · 3.6 Low EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

A one‑byte off‑by‑one error in bit7z’s SafeOutPathBuilder::restoreSymlink() allows a malicious .7z archive to forge a symlink that escapes the intended extraction directory. When the archive is extracted on non‑Windows platforms, subsequent entries written through that symlink can create or overwrite arbitrary files with the permissions of the extracting process, enabling a compromise of confidentiality and integrity.

Affected Systems

The affected product is rikyoz:bit7z. All non‑Windows installations running any version prior to 4.0.12 are susceptible, while version 4.0.12 and later contain the fix.

Risk and Exploitability

The CVSS score of 3.6 indicates moderate severity and the EPSS score is not reported, suggesting limited publicly available exploitation data. The vulnerability is not listed in the CISA KEV catalog. Based on the description, the likely attack vector is local: an attacker who can supply an archive and trigger extraction on a vulnerable system can force the creation of files outside the intended directory.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade bit7z to version 4.0.12 or later.
  • If an upgrade is not immediately possible, configure your environment to disable symlink creation or strip symlinks from archives before extraction.
  • Ensure that only trusted archives are processed and audit extraction directories for unexpected file changes.

Generated by OpenCVE AI on June 10, 2026 at 23:01 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Rikyoz
Rikyoz bit7z
Vendors & Products Rikyoz
Rikyoz bit7z
Type Values Removed Values Added
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.
Title bit7z: Path Traversal via Null Byte Injection from `gcount()` Off-by-One in `restoreSymlink()`
Weaknesses CWE-193
CWE-22
References
Metrics cvssV3_1

{'score': 3.6, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:L'}

Weaknesses
  • CWE-193

    Off-by-one Error

  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 11, 2026, 2:13 PM
Reserved
May 12, 2026, 12:51 AM
Status
Deferred
Published
Jun 10, 2026, 10:16 PM
Modified
Jul 23, 2026, 9:10 AM