CVE-2026-49253: Electerm Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-38j7-23hf-9mhc
CVSS 7.1
CWE-22
Published
Advisory Summary

CVE-2026-49253 is a HIGH (CVSS 7.1) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Electerm libraries in the npm ecosystem. The issue involves electerm has path traversal in zmodem and trzsz download filename handling. Remediation is available by upgrading affected packages to version 3.11.11.

CVE-2026-49253 at a Glance

CVE Identifier CVE-2026-49253
GHSA Identifier GHSA-38j7-23hf-9mhc
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Electerm
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2026-49253

To remediate this vulnerability, upgrade all affected Electerm dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

electerm fixed: 3.11.11
npm install electerm@3.11.11
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls electerm

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-49253, inspect your project dependencies using npm:

npm ls electerm

Analyze the terminal output to locate any version of Electerm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.11.11), your application is affected.

Note: The npm ls electerm command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Electerm, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 - https://github.com/electerm/electerm/commit/fde153d677a170c5816368f6586647f3af4ef284 ### 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

CVE-2026-49253 Affected Electerm Versions

1 component(s)
Fixed Versions:
3.11.11
Product / Package Ecosystem Affected Versions Fixed Version
electerm
npm
< 3.11.11
3.11.11

References

Frequently Asked Questions

What is CVE-2026-49253?
CVE-2026-49253 is a security vulnerability in Electerm involving electerm has Path Traversal in Zmodem and Trzsz Download Filename Handling under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Electerm versions are affected?
Affected versions include releases prior to 3.11.11 across affected packages: electerm.
What version fixes CVE-2026-49253?
Upgrading to 3.11.11 (or the latest patched release for your respective branch) resolves the vulnerability.
Is electerm affected?
Yes, electerm is affected in releases prior to 3.11.11. Upgrade your dependency to 3.11.11 or later.
What is the CVSS score of CVE-2026-49253?
CVE-2026-49253 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L.
What CWE is associated with CVE-2026-49253?
CVE-2026-49253 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check npm dependencies for CVE-2026-49253?
Run the dependency tree command: 'npm ls electerm'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-38j7-23hf-9mhc",
  "modified" : "2026-07-02T19:20:20Z",
  "published" : "2026-07-02T19:20:20Z",
  "aliases" : [ "CVE-2026-49253" ],
  "summary" : "electerm has Path Traversal in Zmodem and Trzsz Download Filename Handling",
  "details" : "### Impact\n\nA 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.\n\nA 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.\n\n**Attack scenario:**\n1. User connects to a malicious SSH server\n2. Attacker initiates a Zmodem or Trzsz file transfer\n3. Attacker supplies a traversal filename (e.g., `../../.bashrc`, `../escaped.txt`)\n4. User accepts the transfer and selects a download directory\n5. File is written outside the selected directory, potentially overwriting sensitive files\n\n**Affected components:**\n- `src/app/server/zmodem.js` - `prepareReceiveFile()` at line 736\n- `src/app/server/trzsz.js` - `getUniqueFilePath()` at line 559, `openSaveFile()` callback, and `savedFilePaths` mapping\n\n### Patches\n\n- https://github.com/electerm/electerm/commit/fde153d677a170c5816368f6586647f3af4ef284\n\n### Workarounds\n\n\nIf upgrading is not immediately possible, users can mitigate this vulnerability by:\n1. Only connecting to trusted SSH servers\n2. Rejecting or canceling any incoming Zmodem or Trzsz file transfers from untrusted sources\n3. Avoiding the use of Zmodem (`sz`/`rz`) and Trzsz (`trz`/`tsz`) commands on untrusted servers",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electerm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.11.11"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.11.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/electerm/electerm/security/advisories/GHSA-38j7-23hf-9mhc"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/electerm/electerm/commit/fde153d677a170c5816368f6586647f3af4ef284"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/electerm/electerm"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-02T19:20:20Z",
    "nvd_published_at" : null
  }
}