Prepared by Cytomate · August 2026 · CVSS 7.0 (High) · CWE-122 · Classification: TLP:WHITE: Distribution Unrestricted
Executive Summary
CVE-2026-14266 is a heap-based buffer overflow residing in 7-Zip's XZ decompression engine. The vulnerability is triggered when a crafted XZ-compressed archive is opened or processed: causing the decoder to write data beyond the boundaries of an allocated heap buffer. The resulting memory corruption can escalate to arbitrary code execution in the security context of the user or process running 7-Zip.
The flaw is rooted in a logic error in 7-Zip's multi-pass XZ chunk decoding path: the engine incorrectly tracks how much output buffer space has been consumed across successive decoding iterations, allowing a carefully structured archive to drive out-of-bounds writes into adjacent heap memory. This class of vulnerability (a heap OOB write in a format decoder) has a well-established history of producing exploitable conditions.
7-Zip version 26.02, released 25 June 2026, contains the fix. All prior versions are affected. The vulnerability was formally disclosed by the Zero Day Initiative on 15 July 2026 under advisory ZDI-26-444. No confirmed in-the-wild exploitation has been reported as of August 2026.
Disclosure Timeline
| 25 June 2026 | 7-Zip 26.02 released. Release notes do not describe the security fix in detail. |
| 15 July 2026 | ZDI publishes advisory ZDI-26-444, formally identifying CVE-2026-14266 and attributing the fix to 7-Zip 26.02. |
| July 2026 | Security community analysis of the patch and advisory begins. Vulnerability class and affected component confirmed. |
| August 2026 | No confirmed in-the-wild exploitation. No public weaponised RCE exploit known at time of writing. |
Vulnerability at a Glance
| CVE ID | CVE-2026-14266 |
| Vulnerability Class | Heap-Based Buffer Overflow (CWE-122) |
| Vulnerable Component | XZ Decoder: MixCoder_Code function in C/XzDec.c |
| CVSS Score | 7.0 (High) |
| Attack Vector | Local / Social Engineering: requires user interaction |
| Affected Versions | All 7-Zip versions prior to 26.02 |
| Fixed Version | 7-Zip 26.02 (released 25 June 2026) |
| ZDI Advisory | ZDI-26-444 (published 15 July 2026) |
| In-the-Wild Exploitation | Not confirmed as of August 2026 |
| Tested Platform | Windows 11 x64 |
Technical Analysis
1. Background: 7-Zip, XZ, and the Decoder Architecture
7-Zip is an open-source file archiver that supports a wide range of compression formats. Its XZ support processes the XZ container format: a widely used packaging format built on the LZMA2 compression algorithm. XZ archives are common in Linux software distribution, developer toolchains, and increasingly in Windows environments.
Inside 7-Zip, XZ decompression is handled by C/XzDec.c. The architecture involves a layered decoder: the outer XZ parser reads the stream structure (header, blocks, index, footer), then hands off compressed data blocks to a lower-level LZMA2 decoder. The component responsible for orchestrating multi-pass decoding across these layers is the MixCoder_Code function.
The XZ format supports an efficient mode for raw (uncompressed) data called LZMA2 ‘copy chunks’. In this mode, data passes through the LZMA2 layer without compression: the payload bytes are written directly into the output buffer. This path is the trigger vector for CVE-2026-14266.
2. The XZ Block and Buffer Allocation Model
When 7-Zip begins processing an XZ block, it reads the block header to determine the expected decompressed output size (the ‘unpack size’). It allocates a heap buffer of exactly this size to hold the decoded output. The unpack size value comes directly from attacker-controlled data in the archive: it is trusted implicitly during buffer allocation.
Decompression then proceeds in iterations: the LZMA2 decoder is called repeatedly, writing decoded bytes into the allocated output buffer in chunks until the full declared unpack size has been decompressed. The critical contract in this loop is that on each iteration, the decoder must be told how much space remains in the output buffer, not the total size, but the remaining available space after prior iterations have already written into it.
3. The Root Cause: Residual Buffer Space Not Tracked
The vulnerability exists because MixCoder_Code violates the contract described above. Across successive decoding iterations, the function passes the full original output buffer length to the decoder on every call, rather than subtracting the number of bytes already written in prior iterations.
In pseudocode terms, the vulnerable logic behaves as:
for each chunk in XZ block:
decode_chunk(output_buffer, outSize) // outSize = full buffer size, never decremented
output_ptr += bytes_written
The correct behaviour should be:
remaining = outSize
for each chunk in XZ block:
decode_chunk(output_buffer + written, remaining) // remaining shrinks with each pass
written += bytes_written_this_pass
remaining -= bytes_written_this_pass
Because the decoder is consistently told that the full buffer length is available (even after the buffer pointer has already advanced past the initial allocation), it has no mechanism to detect that it has reached the boundary. The decoder continues writing at the advancing pointer address, past the end of the originally allocated heap buffer, into whatever memory follows it on the heap.
MixCoder_Code passes the total output buffer size to the LZMA2 decoder on every iteration rather than passing the remaining available space. The buffer pointer advances but the size argument does not shrink, so the decoder writes past the allocation boundary.
4. How the Overflow Is Triggered: The XZ Chunked Data Path
To reach the vulnerable code path, an attacker must cause 7-Zip to process an XZ archive containing LZMA2 data structured as a sequence of copy chunks. The trigger requires two conditions to be true simultaneously:
- The XZ block header must declare an unpack size that the decoder will attempt to fully satisfy.
- The LZMA2 payload must contain more copy-chunk data than the declared unpack size can accommodate: sufficient to push the advancing output pointer beyond the allocated buffer boundary.
When these conditions are met, the decoding loop proceeds as follows:
- Buffer Allocation. 7-Zip reads the unpack size from the XZ block header and allocates a heap buffer of that size. The buffer is correctly sized for the declared output. The allocation itself is not the vulnerability.
- Iteration Begins. The LZMA2 decoder begins processing copy chunks. Each chunk writes a payload of raw bytes into the output buffer. The output pointer advances correctly with each write. After filling chunks up to the declared unpack size, the buffer is now full.
- Out-of-Bounds Writes Begin. The LZMA2 payload contains additional copy chunks beyond what the buffer can hold. Because
MixCoder_Codestill passes the original full buffer size to the decoder, not the remaining space (which is now zero), the decoder proceeds to write the next chunk. The output pointer is now pointing past the end of the allocated region. These writes corrupt adjacent heap memory. - Heap Corruption. The overwritten memory may contain heap metadata (chunk size fields, free-list pointers, canary values) or the data of adjacent heap allocations belonging to the same process. The immediate result is a process crash if a heap integrity check fires. Under a controlled exploitation scenario, the overwritten content can be shaped to redirect control flow.
Risk Assessment
Factors Elevating Practical Risk
- 7-Zip's ubiquity. 7-Zip is installed across hundreds of millions of systems globally, including enterprise workstations, developer environments, build servers, and operational tooling. Archive handling is its core function: the vulnerability sits directly in the highest-frequency code path.
- No automatic update mechanism. 7-Zip has no built-in update capability. Without active enterprise deployment or manual user action, vulnerable versions will persist indefinitely. Version sprawl across the estate should be assumed unless inventory has been confirmed.
- Attacker-controlled write content. Unlike some heap overflows where overflow bytes are predictable but not attacker-controlled, the LZMA2 copy-chunk path allows arbitrary byte content to be written beyond the buffer boundary. This provides a meaningful advantage to an attacker attempting controlled exploitation.
- Archive files as a standard delivery mechanism. The delivery vector (a malicious compressed file) is one of the most common and effective mechanisms in phishing and commodity malware campaigns. Defences designed to block ‘unknown’ or ‘suspicious’ files are systematically bypassed by files that appear to be normal archives.
- Privilege amplification potential. If 7-Zip is invoked by an elevated process: a SYSTEM-level service, an administrative workflow, or an automated pipeline running with privileged credentials: successful exploitation achieves code execution at that elevated privilege level, not merely at the user level implied by the CVSS score.
| Risk Factor | Assessment |
|---|---|
| Vulnerability Class | Heap OOB Write: historically exploitable to RCE |
| Delivery Mechanism | Malicious archive: well-established, high-success delivery path |
| Business Impact | High: arbitrary code execution, data theft, ransomware, lateral movement |
| Detection Availability | No CVE-specific IOCs; behavioural detection only |
| Remediation Complexity | Low: single version upgrade, no configuration changes |
| Urgency | High: patch immediately; do not wait for in-the-wild confirmation |
Remediation and Mitigations
Primary Remediation: Upgrade to 7-Zip 26.02 or Later
The definitive and only complete fix is upgrading all 7-Zip installations to version 26.02 or later. Download from the official site: 7-zip.org
7-Zip does not include an automatic update mechanism. Updates must be actively deployed. Do not rely on end users to self-upgrade. Confirm rollout through endpoint inventory before closing this as remediated.
IT / Endpoint Management
- Query SCCM, Intune, or equivalent endpoint management tooling for all installed 7-Zip versions across the estate.
- Deploy 7-Zip 26.02 via software distribution. Prioritise endpoints that regularly handle external files: workstations, help desk machines, developer systems, and file-processing servers.
- Confirm installation completion: do not treat deployment push as equivalent to verified installation.
- Retire any deployment packages, scripts, or shortcuts referencing older 7-Zip versions.
Security Operations
During the patching window, monitor for anomalous process behaviour originating from 7-Zip:
7z.exe,7za.exe, or7zr.exespawning unexpected child processes (cmd.exe,powershell.exe,wscript.exe,mshta.exe)- Execution events from
%TEMP%,%APPDATA%, or download directories within seconds of archive extraction - Registry persistence mechanisms (Run keys, Scheduled Tasks) appearing in the lineage of a 7-Zip process
- Outbound network connections initiated by 7-Zip or by processes it spawns
Correlate archive-handling events with subsequent credential access activity, LSASS access, or lateral movement indicators.
Vulnerability Management
- Track CVE-2026-14266 with a remediation SLA appropriate to your risk posture: treat as High priority.
- Monitor NVD, ZDI, and threat intelligence sources for updated exploitability signals or in-the-wild activity reports.
- Reassess risk classification if weaponised exploitation is confirmed in the wild: the current CVSS of 7.0 may understate practical risk at that point.
Detection Guidance
No CVE-2026-14266-specific indicators of compromise have been published as of August 2026. Detection must rely on behavioural signals. The following represent the highest-value detection opportunities:
Process Behaviour
- 7-Zip executables (
7z.exe,7za.exe,7zr.exe) spawning interpreter or shell processes as direct children. - Any new process whose parent is a 7-Zip binary and whose image path resolves to a user-writeable directory.
- 7-Zip process creating executable files in
%TEMP%or%APPDATA%during extraction.
File Characteristics
- XZ archives delivered via email from external senders, particularly those not matching expected business communication patterns.
- XZ files appearing as inner layers within multi-format archive containers received from external sources.
Conclusion
CVE-2026-14266 is a memory-safety vulnerability in the core file-parsing engine of one of the most widely deployed archive utilities in the world. The root cause (a failure to track consumed buffer space across iterative decoding passes) is a straightforward logic error with serious consequences: it allows an attacker to write attacker-controlled bytes into arbitrary heap memory, triggering a corruption condition that belongs to a class with a long history of successful exploitation.
The attack delivery vector is aligned with the most common malware distribution mechanism in use today. The absence of an auto-update mechanism in 7-Zip means patching requires deliberate action. The fix is available, well-defined, and requires no configuration changes: the only variable is the speed and completeness of deployment.
Security teams should treat this as an active patching obligation. The window between publication of technical details and the appearance of weaponised exploitation in the wild has historically been narrow for vulnerabilities in widely-deployed file-handling software. Do not wait for in-the-wild confirmation before acting. Update 7-Zip to 26.02 or later, confirm deployment through inventory, and monitor for anomalous archive-handling behaviour until patching is complete.
References
7-Zip Official Site: 7-zip.org
ZDI Advisory ZDI-26-444: Zero Day Initiative, 15 July 2026
NVD Entry: nvd.nist.gov/vuln/detail/CVE-2026-14266
