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-105840 Overview
CVE-2026-105840 is a path traversal vulnerability [CWE-22] in lrzsz versions before 0.13.0. The flaw resides in the lrz receive utility's restricted mode and allows a malicious ZMODEM sender to write files outside the current working directory. The checkpath() function in src/lrz.c only rejects ../ sequences unless the build uses the --enable-pubdir option. As a result, a sender can transmit files with absolute pathnames and overwrite any file writable by the receiving user.
Critical Impact
A remote ZMODEM peer can overwrite arbitrary files owned by the user running lrz, enabling configuration tampering, SSH key replacement, and local code execution.
Affected Products
- lrzsz versions prior to 0.13.0
- The lrz receive utility when invoked in restricted mode
- Builds that do not use the --enable-pubdir compile option
Discovery Timeline
- 2026-10-06 - CVE-2026-105840 published to the National Vulnerability Database (NVD)
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-105840
Vulnerability Analysis
The lrz program implements the receiving end of the ZMODEM file transfer protocol. It supports a restricted mode intended to confine writes to the current working directory, protecting users who run it on untrusted serial or network streams. The restriction is enforced by checkpath() in src/lrz.c.
The function's validation is incomplete. It only rejects filenames containing ../ sequences and does not reject absolute pathnames beginning with /. When the binary is compiled without the --enable-pubdir option, which is the default for most distribution packages, the restricted mode fails to block absolute paths supplied by the remote sender.
A malicious ZMODEM sender can therefore specify a destination such as /home/user/.ssh/authorized_keys or /home/user/.bashrc. The receiver writes the attacker-controlled file content to that absolute location using the privileges of the user running lrz.
Root Cause
The root cause is incomplete input validation in checkpath(). The function filters only relative traversal tokens and omits a check for leading / characters, violating the security invariant that restricted mode should confine output to the current directory.
Attack Vector
Exploitation requires that a victim initiate or accept a ZMODEM transfer from an attacker-controlled source. This can occur over a terminal session, serial link, or any program embedding lrz as a transfer helper. The sender transmits a file whose declared name is an absolute path to a target file. lrz writes the payload to that path without rejecting it.
See the VulnCheck Advisory on LRZ Sz for full technical details.
// No verified exploit code available.
// The attack sends a ZMODEM file header whose filename field is an
// absolute path such as /home/<user>/.ssh/authorized_keys.
Detection Methods for CVE-2026-105840
Indicators of Compromise
- Files owned by a user that were modified during or shortly after an interactive terminal session involving lrz or rz.
- Unexpected changes to shell startup files such as ~/.bashrc, ~/.profile, or SSH authorized key files following a ZMODEM transfer.
- Audit log entries showing lrz or rz processes writing to paths outside the invoking shell's current working directory.
Detection Strategies
- Inventory hosts for installed lrzsz packages and flag any version earlier than 0.13.0.
- Enable Linux auditd rules on open and openat syscalls made by lrz and rz binaries and alert when target paths resolve outside the process cwd.
- Review terminal emulators and automation scripts that auto-invoke rz/lrz on ZMODEM escape sequences, as these expand the exploitable surface.
Monitoring Recommendations
- Collect file integrity monitoring events on sensitive user files including ~/.ssh/, ~/.bashrc, ~/.profile, and cron files.
- Correlate shell session telemetry with file-write events to identify writes initiated during ZMODEM transfers.
- Monitor outbound and inbound terminal sessions for unexpected ZMODEM transfer initiations.
How to Mitigate CVE-2026-105840
Immediate Actions Required
- Upgrade lrzsz to version 0.13.0 or later on all systems where lrz or rz is installed.
- Audit terminal emulators and SSH automation tools that auto-launch rz on ZMODEM escape sequences and disable that behavior where possible.
- Review recent modifications to user-owned configuration and key files on systems where lrz was used against untrusted peers.
Patch Information
The fix is included in lrzsz version 0.13.0. See the LRZ Sz Version 0.13.0 News for release notes and the LRZ Sz Software Overview for upstream download information.
Workarounds
- Rebuild lrzsz from source with the --enable-pubdir configure option, which activates the full path check in checkpath().
- Avoid running lrz or rz while connected to untrusted remote systems, including SSH sessions to hosts you do not control.
- Remove or restrict execute permissions on the lrz and rz binaries on systems where ZMODEM transfers are not required.
# Rebuild from source with the restrictive pubdir check enabled
./configure --enable-pubdir
make
sudo make install
# Verify installed version is 0.13.0 or newer
lrz --version
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

