CVE-2026-45380
JSON

3.6low

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

Severity
3.6low CVSS:3.1 by GitHub_M
Exploit likelihood
0.12% (higher than 1% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

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.

Affected

Product or packageVersionsReported by
rikyoz bit7z< 4.0.12CVE List

Classification

CWE-22CWE-193

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

bit7z es una biblioteca estática de C++ multiplataforma que permite la compresión/extracción de archivos de archivo. Antes de la versión 4.0.12, un error de un byte por uno en SafeOutPathBuilder::restoreSymlink() permite a un atacante crear un archivo .7z que, al ser extraído con bit7z en cualquier plataforma que no sea Windows, crea un enlace simbólico que escapa del directorio de salida previsto. Las entradas de archivo subsiguientes extraídas a través de este enlace simbólico escriben archivos arbitrarios fuera del directorio de extracción con los permisos del proceso de extracción. Este problema ha sido parcheado en la versión 4.0.12.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-45380 changed 2026-06-11CVE Terms of Use
NVDCVE-2026-45380 changed 2026-07-23Public domain