High

electerm has Path Traversal in Zmodem and Trzsz Download Filename Handling

  • Disclosed: 02.07.2026
  • Updated: 11.10.2026 10:22

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:

  1. User connects to a malicious SSH server
  2. Attacker initiates a Zmodem or Trzsz file transfer
  3. Attacker supplies a traversal filename (e.g., ../../.bashrc, ../escaped.txt)
  4. User accepts the transfer and selects a download directory
  5. 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:

  1. Only connecting to trusted SSH servers
  2. Rejecting or canceling any incoming Zmodem or Trzsz file transfers from untrusted sources
  3. Avoiding the use of Zmodem (sz/rz) and Trzsz (trz/tsz) commands on untrusted servers

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package electerm < 3.11.11 3.11.11

References

CVSS score 7.1/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
Weakness (CWE)
CWE-22
Platform
npm
Package
electerm
Disclosed
02.07.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-38j7-23hf-9mhc - CC BY 4.0

Vulnerability history: electerm

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (13) in the archive
Total entries
13
First → latest
01.2023 07.2026
Without a fix
4
Exploited in attacks
0

Severity breakdown

  • Critical 7
  • High 4
  • Medium 2

Disclosures per year

  1. 2023: 1
  2. 2024: 0
  3. 2025: 0
  4. 2026: 12
Severity:
  1. electerm has Path Traversal in Zmodem and Trzsz Download Filename Handling this entry
    High · 7.1 CVE-2026-49253 < 3.11.11 3.11.11
  2. Critical · 7.8 CVE-2026-45353 >= 3.0.6, < 3.9.0 3.9.0
  3. Critical · 9.6 CVE-2026-43944 >= 3.0.6, < 3.8.8 3.8.8
  4. Critical · 9.8 CVE-2026-41501 < 3.3.8 3.3.8
  5. Critical · 9.8 CVE-2020-23256 <= 1.3.22 no fix

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.