Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. electerm
  4. ›
  5. CVE-2026-49253

CVE-2026-49253: electerm has Path Traversal in Zmodem and Trzsz Download Filename Handling

July 2, 2026

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

References

  • github.com/advisories/GHSA-38j7-23hf-9mhc
  • github.com/electerm/electerm/commit/fde153d677a170c5816368f6586647f3af4ef284
  • github.com/electerm/electerm/security/advisories/GHSA-38j7-23hf-9mhc
  • nvd.nist.gov/vuln/detail/CVE-2026-49253

Code Behaviors & Features

Detect and mitigate CVE-2026-49253 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 3.11.11

Fixed versions

  • 3.11.11

Solution

Upgrade to version 3.11.11 or above.

Impact 7.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

npm/electerm/CVE-2026-49253.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:22 +0000.