Skip to content
OpenAdvisories
High · 8.8 Public exploit CVE-2026-48095 EUVD-2026-34838

GHSL-2026-140_7-Zip: 7-Zip has a heap buffer overflow via NTFS compressed stream buffer under-allocation

Published Jun 5, 2026 · Updated Jun 8, 2026 · Assigned by GitHub_M

Description

7-Zip is a file archiver with a high compression ratio. Versions 26.00 and prior contain a heap buffer overflow vulnerability caused by an under-allocation in the NTFS compressed stream buffer (GetCuSize shift UB), potentially allowing attackers to cause arbitrary code execution or application crashes. CInStream::GetCuSize() in the NTFS handler computes the compression-unit buffer size as (UInt32)1 << (BlockSizeLog + CompressionUnit), and a crafted image with ClusterSizeLog >= 28 and CompressionUnit == 4 drives the exponent to 32, which is undefined behavior and collapses on x86/x64 so _inBuf is allocated as 1 byte. ReadStream_FALSE then writes up to 256 MB of attacker-controlled data into that 1-byte buffer in 64 KB iterations, and because the CInStream object sits only 304 bytes after _inBuf, its vtable pointer is overwritten and the next dispatched call achieves a vtable hijack. On 32-bit builds the overflow is unconditionally reached; on 64-bit it requires the parallel 8 GB _outBuf allocation to succeed, otherwise failing closed to denial of service. The NTFS handler is enabled by default in stock 7z.dll and, via signature-based fallback matching "NTFS " at offset 3, will open a crafted image regardless of file extension during extraction or testing. Version 26.01 fixes the issue.

Affected products

VendorProductAffectedFixed
mcmilk 7-Zip <= 26.00 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 7zip 26.01+dfsg-1 —
Debian 13 7zip No fix yet —
Debian 13 p7zip 16.02+transitional.1 —
Debian 12 7zip 22.01+really26.01+dfsg-0+deb12u1 —
Debian 12 p7zip 16.02+really26.01+dfsg-0+deb12u1 —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 7zip No fix yet —
Ubuntu 26.04 LTS 7zip No fix yet —
Ubuntu 25.10 7zip No fix yet —
Ubuntu 22.04 LTS p7zip No fix yet —
Ubuntu 20.04 LTS p7zip No fix yet —
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS p7zip No fix yet —
Ubuntu 16.04 LTS p7zip No fix yet —
Ubuntu 14.04 LTS p7zip No fix yet —
Ubuntu Pro 24.04 LTS 7zip No fix yet —
Ubuntu Pro 22.04 LTS 7zip No fix yet —
ReleasePackageFixed inAdvisory
SLES 15 SP7 7zip 26.01-150400.9.6.1 SUSE-SU-2026:2696-1
SLES 15 SP6 7zip 26.01-150400.9.6.1 SUSE-SU-2026:2696-1
SLES 15 SP5 7zip 26.01-150400.9.6.1 SUSE-SU-2026:2696-1
SLES 15 SP4 7zip 26.01-150400.9.6.1 SUSE-SU-2026:2696-1
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 7zip 26.01-160000.1.1 SUSE-SU-2026:22347-1
SLES for SAP 15 SP6 7zip 26.01-150400.9.6.1 SUSE-SU-2026:2696-1
SLES for SAP 15 SP5 7zip 26.01-150400.9.6.1 SUSE-SU-2026:2696-1
SLES for SAP 15 SP4 7zip 26.01-150400.9.6.1 SUSE-SU-2026:2696-1
SLES 16.0 7zip 26.01-160000.1.1 SUSE-SU-2026:22347-1
SLE HPC 15 SP5 7zip 26.01-150400.9.6.1 SUSE-SU-2026:2696-1
SLE HPC 15 SP4 7zip 26.01-150400.9.6.1 SUSE-SU-2026:2696-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed 7zip 26.01-1.1 openSUSE-SU-2026:10942-1
openSUSE Leap 16.0 7zip 26.01-160000.1.1 openSUSE-SU-2026:21038-1
ReleasePackageFixed inAdvisory
Alpine v3.24 7zip 26.01-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 7zip +3 26.01-14.amzn2023.0.1 ALAS2023-2026-1820

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 6

References