7-Zip NTFS Handler Flaw Enables Code Execution via Crafted Archives
CVE-2026-48095 in 7-Zip allows attackers to execute arbitrary code through malicious NTFS images. CVSS 8.8 - update to v26.01 immediately.
A critical heap buffer overflow vulnerability in 7-Zip's NTFS archive handler allows attackers to execute arbitrary code by tricking users into opening malicious archive files. The flaw, tracked as CVE-2026-48095, carries a CVSS 3.1 score of 8.8 and affects all versions through 26.00.
Jaroslav Lobačevski of the GitHub Security Lab discovered the vulnerability, which stems from undefined behavior in C++ when computing NTFS compression-unit buffer sizes.
How the Vulnerability Works
The flaw resides in the CInStream::GetCuSize() function within NtfsHandler.cpp. The vulnerable code computes buffer size using a 32-bit shift operation: (UInt32)1 << (BlockSizeLog + CompressionUnit).
When an attacker crafts an NTFS image with ClusterSizeLog >= 28 and a compressed data attribute carrying CompressionUnit == 4, the shift exponent reaches 32. This triggers undefined behavior in C++, which on x86 hardware causes _inBuf to be allocated as just one byte due to hardware masking of shift counts.
The undersized buffer is then passed to ReadStream_FALSE, which writes up to 256 MB of attacker-controlled data into that single byte. The massive overflow enables a classic vtable hijack, giving attackers arbitrary code execution.
Any File Extension Can Trigger the Bug
What makes this vulnerability particularly dangerous is how 7-Zip handles file detection. The NTFS handler uses signature-based fallback detection, meaning a malicious NTFS image can be disguised with any file extension—.7z, .zip, .rar, or even no extension at all.
When an extension-matched handler rejects the file, 7-Zip falls back to signature detection, which identifies the malicious NTFS image and routes it to the vulnerable handler. This behavior mirrors the WinRAR CVE-2025-6218 exploitation pattern we covered earlier this year, where APT groups leveraged similar archive parsing flaws to deliver malware.
Security teams should note that traditional file extension blocklists won't protect against this attack. An attacker could name the malicious payload quarterly_report.xlsx and 7-Zip would still process it through the vulnerable NTFS handler.
Exploitation Requirements
Successful exploitation requires:
- Attacker crafts a malicious NTFS image with specific ClusterSizeLog and CompressionUnit values
- Victim opens the file using 7-Zip (any version through 26.00)
- No additional user interaction needed beyond opening the archive
The attack surface extends to any workflow where 7-Zip processes untrusted archives—email attachments, file uploads, automated backup systems, or development pipelines that extract dependencies.
Why This Matters
Archive utilities represent a persistent attack surface because they parse complex file formats from untrusted sources by design. This vulnerability is classified under CWE-787 (Out-of-Bounds Write) and CWE-190 (Integer Overflow or Wraparound), both common root causes in archive handler exploits.
The 7-Zip flaw follows a broader pattern of compression utility vulnerabilities. Earlier this year, we covered how Apache HTTP/2 CVE-2026-23918 demonstrated similar memory corruption issues in data handling code. Organizations that audit web server configurations but overlook desktop utilities may miss similar exposure.
Given 7-Zip's widespread use—it's a default tool in many IT departments and CI/CD pipelines—enterprises should treat this as a priority patch. The utility is commonly installed on developer workstations, build servers, and administrative endpoints where an RCE vulnerability has outsized impact.
Recommended Actions
- Update immediately - Upgrade to 7-Zip v26.01, which patches the vulnerable GetCuSize() computation
- Block at the perimeter - Configure email gateways to quarantine NTFS image files (.ntfs, .img) and archives containing them
- Audit automated systems - Identify CI/CD pipelines, backup systems, and scripts that invoke 7-Zip on untrusted input
- Monitor for exploitation - Watch for 7-Zip crashes or unusual memory usage patterns that could indicate exploitation attempts
For organizations managing cybersecurity tools and endpoint configurations, adding 7-Zip version monitoring to existing vulnerability management workflows is straightforward given the clear version boundary.
Technical Classification
| Property | Value |
|---|---|
| CVE | CVE-2026-48095 |
| Advisory | GHSL-2026-140 |
| CVSS 3.1 | 8.8 (High) |
| CWE | CWE-787, CWE-190 |
| Vector | AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| Affected | 7-Zip through v26.00 |
| Fixed | 7-Zip v26.01 |
Users running older 7-Zip versions should update regardless of whether they knowingly handle NTFS images. The signature-based fallback detection means any archive file could potentially trigger the vulnerable code path.
Related Articles
Apache HTTP/2 Double-Free Enables DoS and RCE
CVE-2026-23918 in Apache HTTP Server 2.4.66 lets attackers crash workers trivially or achieve remote code execution through a double-free in mod_http2. Upgrade to 2.4.67 immediately.
May 23, 2026nginx-poolslip: New Zero-Day Bypasses ASLR for RCE, No Patch
Security researchers disclose nginx-poolslip, an unpatched zero-day in NGINX 1.31.0 that defeats ASLR protection. Millions of servers at risk with no CVE or fix available yet.
May 21, 2026SEPPMail Gateway Flaws Enable Complete Mail System Takeover
Seven vulnerabilities including CVE-2026-2743 (CVSS 10.0) allow unauthenticated attackers to compromise SEPPMail secure email gateways, read all traffic, and establish persistent access. Patch to 15.0.4 immediately.
May 20, 2026NGINX Rift: 18-Year-Old Heap Overflow Enables RCE on Web Servers
CVE-2026-42945 is a critical heap buffer overflow in NGINX's rewrite module that went undetected since 2008. CVSS 9.2 with public PoC available—patch now.
May 15, 2026