Loading advisory.
Loading advisory.
electerm has Path Traversal in Zmodem and Trzsz Download Filename Handling
A path traversal vulnerability exists in the Zmodem and Trzsz file download handlers in electerm. When receiving files via Zmodem or Trzsz protocols, electerm uses the remote-supplied filename directly in path.join() with the user-selected download directory without sanitization.
Published 2026-07-02 19:20 UTC · Modified 2026-08-21 19:31 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score.
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| electerm | npm | < 3.11.11 | 3.11.11 | npm install electerm@3.11.11 |
A path traversal vulnerability exists in the Zmodem and Trzsz file download handlers in electerm. When receiving files via Zmodem or Trzsz protocols, electerm uses the remote-supplied filename directly in path.join() with the user-selected download directory without sanitization.
A malicious SSH server or remote shell process can send a specially crafted filename such as ../escaped.txt to escape the user-selected download directory and write files to arbitrary locations on the user's filesystem, subject to process permissions.
Attack scenario:
User connects to a malicious SSH server
Attacker initiates a Zmodem or Trzsz file transfer
Attacker supplies a traversal filename (e.g., ../../.bashrc, ../escaped.txt)
User accepts the transfer and selects a download directory
File is written outside the selected directory, potentially overwriting sensitive files
Affected components:
src/app/server/zmodem.js - prepareReceiveFile() at line 736
src/app/server/trzsz.js - getUniqueFilePath() at line 559, openSaveFile() callback, and savedFilePaths mapping
https://github.com/electerm/electerm/commit/fde153d677a170c5816368f6586647f3af4ef284
If upgrading is not immediately possible, users can mitigate this vulnerability by:
Only connecting to trusted SSH servers
Rejecting or canceling any incoming Zmodem or Trzsz file transfers from untrusted sources
Avoiding the use of Zmodem (sz/rz) and Trzsz (trz/tsz) commands on untrusted servers
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
One EPSS score on record: 0.004 on 2026-11-24.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.004 | first score | v2026.06.15 |