Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-105842 Overview
CVE-2026-105842 is a heap-based buffer overflow [CWE-122] in the lrz receive utility of lrzsz versions prior to 0.13.0. The flaw resides in the procheader() function, which copies sender-supplied filenames into the fixed-size Pathname buffer. A malicious ZMODEM sender can transmit filenames up to 8192 bytes, overflowing the destination buffer through sprintf() in pipe mode or strcpy() in standard mode. The resulting heap corruption crashes lrz and may enable further memory manipulation. Because lrzsz is widely bundled in Unix-like distributions for serial file transfer and often invoked from terminal emulators, the vulnerability has broad exposure wherever ZMODEM receive is accepted.
Critical Impact
A remote ZMODEM sender can corrupt heap memory and crash the receiving lrz process by supplying an overlong filename, with potential for further exploitation of the heap state.
Affected Products
- lrzsz versions prior to 0.13.0
- Terminal emulators and shell environments that invoke lrz for ZMODEM receive
- Linux and Unix-like distributions packaging vulnerable lrzsz builds
Discovery Timeline
- 2026-10-06 - CVE-2026-105842 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-105842
Vulnerability Analysis
The lrz utility implements the ZMODEM receive protocol and processes file headers through the procheader() function. During header handling, procheader() copies the sender-supplied filename into the Pathname buffer without validating the input length. ZMODEM permits filenames up to 8192 bytes, which exceeds the destination buffer size allocated on the heap.
Two code paths trigger the overflow. In pipe mode, procheader() uses sprintf() to format the filename into Pathname. In standard receive mode, it uses strcpy(). Both functions write past the buffer bounds when the filename is longer than the allocated region, corrupting adjacent heap metadata and chunks.
Successful exploitation requires the victim to accept an incoming ZMODEM transfer, which many terminal emulators initiate automatically when they detect the ZMODEM signature in the data stream. This passive user interaction expands the practical attack surface beyond users who explicitly invoke lrz.
Root Cause
The root cause is missing bounds checking on sender-controlled input before copying into a fixed-size heap buffer. Neither sprintf() nor strcpy() enforce destination size limits, and procheader() does not validate that the filename fits in Pathname before invoking them.
Attack Vector
An attacker controls a ZMODEM sender endpoint, such as a compromised remote host, a serial peer, or a session piped through a terminal that auto-triggers ZMODEM. The attacker transmits a crafted ZFILE header whose filename field extends up to 8192 bytes. When the victim's lrz process parses the header, procheader() overflows Pathname and corrupts the heap, crashing the process or producing exploitable allocator state.
The vulnerability manifests entirely in filename handling during protocol parsing. See the VulnCheck Advisory on LRZSz for additional technical details.
Detection Methods for CVE-2026-105842
Indicators of Compromise
- Unexpected crashes or segmentation faults of the lrz process, especially shortly after an incoming terminal session or serial connection
- Core dumps from lrz containing ZMODEM header fragments with filename fields approaching or exceeding 8192 bytes
- Terminal emulator logs showing auto-triggered ZMODEM receive sessions originating from untrusted remote hosts
Detection Strategies
- Inspect packaged lrzsz versions across inventory and flag any build earlier than 0.13.0 using package managers such as dpkg -l lrzsz or rpm -q lrzsz
- Monitor process telemetry for lrz child processes spawned by terminal emulators (xterm, gnome-terminal, tmux, screen) and correlate with abnormal exit codes
- Enable AddressSanitizer or heap-canary builds in test environments to confirm whether an observed crash matches the procheader() overflow signature
Monitoring Recommendations
- Alert on lrz process terminations with signal SIGSEGV or SIGABRT in endpoint detection logs
- Track serial and SSH session metadata for ZMODEM protocol markers (**\\x18B00) delivered from untrusted sources
- Collect and retain core dumps from lrz for forensic review of filename field contents
How to Mitigate CVE-2026-105842
Immediate Actions Required
- Upgrade lrzsz to version 0.13.0 or later on all systems where lrz is installed
- Disable automatic ZMODEM invocation in terminal emulators until the patched package is deployed
- Restrict use of lrz to trusted serial peers and remote hosts, and remove the binary from systems that do not require it
Patch Information
The upstream fix is included in lrzsz version 0.13.0. Release details are documented in the LRZSz Version 0.13.0 News and the broader LRZSz Software Overview. Distribution maintainers should rebuild and republish lrzsz packages against the patched source.
Workarounds
- Remove or chmod the lrz binary where ZMODEM receive is not required: chmod a-x /usr/bin/lrz
- Configure terminal emulators to prompt before launching lrz rather than auto-triggering on ZMODEM signatures
- Route ZMODEM transfers only over authenticated channels where the sender identity is verified
# Verify installed version and remove vulnerable binary if upgrade is pending
dpkg -l lrzsz 2>/dev/null | grep lrzsz
rpm -q lrzsz 2>/dev/null
# Temporary mitigation: disable the lrz binary until patched
sudo chmod a-x /usr/bin/lrz
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

