In breve
- CVE-2026-49253 è una vulnerabilità ALTO (CVSS 7.1) che riguarda electerm.
- Probabilità di sfruttamento nei prossimi 30 giorni (EPSS): 0.44%, superiore al 38.2% delle vulnerabilità.
- Correzione: aggiornare a 3.11.11 o successiva.
| Package | Affected versions | Patched versions |
|---|
| electerm npm | < 3.11.11
| 3.11.11
|
Description
Impact
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
Patches
Workarounds
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
NVD description
electerm is an open-sourced terminal/ssh/sftp/telnet/serialport/RDP/VNC/Spice/ftp client. Prior to 3.11.11, electerm uses remote-supplied filenames directly with path.join() while receiving Zmodem and Trzsz transfers. In src/app/server/zmodem.js, prepareReceiveFile() joins the filename to the user-selected save path, and in src/app/server/trzsz.js, getUniqueFilePath(), the openSaveFile() callback, and the savedFilePaths mapping construct destinations without sanitization. A malicious SSH server or remote shell can provide a filename containing traversal components such as ../escaped.txt or ../../.bashrc. When the victim accepts the transfer and selects a download directory, electerm can write outside that directory and overwrite files accessible to the desktop user, potentially changing sensitive configuration or impairing availability. This issue is fixed in version 3.11.11.
Running one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site free