7-zipcve-2026-14266xz-archiveremote-code-executionpatch

Critical 7‑Zip XZ Buffer Overflow (CVE‑2026‑14266) Discovered and Patched

A heap‑based buffer overflow in 7‑Zip's XZ decoder (CVE‑2026‑14266) allows remote code execution when a crafted XZ archive is opened. Patch 7‑Zip 26.02 mitigates the issue.

Diego Diaz
8 min

What Happened

On July 20 2026 the security community reported a critical heap‑based buffer overflow in the open‑source archiver 7‑Zip. The flaw, identified as CVE‑2026‑14266, resides in the XZ archive decoder. When a user opens a specially crafted XZ file, the decoder writes beyond the allocated output buffer, giving an attacker the ability to execute arbitrary code in the context of the 7‑Zip process.

Technical Analysis

The vulnerability originates in the MixCoder_Code function within C/XzDec.c. The decoder incorrectly assumes the full output buffer size is available on each decompression pass, rather than calculating the remaining space after previous writes. This miscalculation leads to an out‑of‑bounds write and a heap overflow. 7‑Zip versions from 21.07 through 26.01 are affected. The issue was discovered by researcher Landon Peng of Lunbun LLC and reported to the project on June 5 2026. The Zero Day Initiative (ZDI) assigned a CVSS v3.0 score of 7.0 (High) and classified the attack vector as local – requiring user interaction to open the malicious XZ archive. The exploit does not require elevated privileges; the code executes with the same rights as the user running 7‑Zip, typically a filtered standard‑user token on Windows.

The advisory notes that no public proof‑of‑concept or active exploitation has been observed as of the publication date, but the attack surface aligns with common phishing and malicious attachment tactics. The flaw can be triggered by delivering the crafted XZ file via email, malicious download, or compromised website.

Who’s Affected

Anyone using an affected 7‑Zip build on Windows, macOS, or Linux is at risk. Enterprise environments that rely on 7‑Zip for bulk extraction of third‑party archives are especially vulnerable because a single malicious file can compromise an entire workstation. The flaw impacts a broad user base, given 7‑Zip’s popularity in both consumer and corporate settings. Organizations that bundle 7‑Zip libraries into their own software must also verify the version they ship.

How to Protect Yourself

  • Upgrade immediately to 7‑Zip 26.02, released June 25 2026, which fixes the buffer‑overflow logic.
  • Configure email gateways and web proxies to scan for XZ archives and block or sandbox suspicious files.
  • Educate end‑users to avoid opening compressed archives from unknown sources, especially XZ files.
  • For organizations that embed 7‑Zip, verify that all distributed binaries are version 26.02 or later.
  • Monitor endpoint detection platforms for attempts to write outside allocated buffers in 7‑Zip processes.

The Sable Angle

At Sable we routinely analyze archive‑based attack vectors to help clients harden their supply chains. Our research team has published playbooks on detecting malicious XZ payloads in network traffic, and we integrate signature‑based detection into our threat‑intel feeds. Discover more about our offensive research at /research/openclaw and learn how our platform can automate remediation for vulnerable third‑party tools.

Stay ahead of emerging threats by subscribing to our security updates. With Sable’s real‑time monitoring, you’ll receive alerts the moment a new vulnerability like CVE‑2026‑14266 is disclosed, along with actionable mitigation steps.