{"id":"CVE-2026-49253","aliases":["EUVD-2026-62421","GHSA-38j7-23hf-9mhc"],"status":"published","title":"electerm: Path Traversal in Zmodem and Trzsz Download Filename Handling","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.","severity":{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00439,"percentile":0.38632,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-22"],"published":"2026-07-02T19:20:20Z","modified":"2026-10-29T02:30:39Z","fixes":[{"ecosystem":"npm","package":"electerm","fixed_in":["3.11.11"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"electerm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"3.11.0"},{"fixed":"3.11.11"}]}]},{"source":"osv","ecosystem":"npm","package":"electerm","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.11.11"}]}]}],"products":[{"vendor":"electerm","product":"electerm"}],"references":[{"url":"https://github.com/electerm/electerm/security/advisories/GHSA-38j7-23hf-9mhc","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/electerm/electerm/commit/fde153d677a170c5816368f6586647f3af4ef284","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/electerm/electerm/releases/tag/v3.11.11","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/advisories/GHSA-38j7-23hf-9mhc"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/49xxx/CVE-2026-49253.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49253","tags":["advisory"]},{"url":"https://github.com/electerm/electerm","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-49253","title":"electerm: Path Traversal in Zmodem and Trzsz Download Filename Handling","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.","status":"published","published":"2026-08-19T14:31:55.683Z","modified":"2026-08-21T19:31:45.169Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L","level":"high","assessor":"cna"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T13:34:59.78118Z"}],"euvd":[{"id":"EUVD-2026-62421","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.","status":"published","published":"2026-08-19T14:31:55Z","modified":"2026-08-21T19:31:45Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L","level":"high"}],"updated_at":"2026-11-02T18:01:37.198267Z"}],"ghsa":[{"id":"GHSA-38j7-23hf-9mhc","title":"electerm has Path Traversal in Zmodem and Trzsz Download Filename Handling","description":"### 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","status":"published","published":"2026-07-02T19:20:20Z","modified":"2026-07-02T19:20:21Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L","level":"high"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:40:38.48196Z"}],"nvd":[{"id":"CVE-2026-49253","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.","status":"published","published":"2026-08-19T15:17:06.747Z","modified":"2026-10-27T13:10:00.36Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L","level":"high","assessor":"secondary"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:12:39.962615Z"}],"osv":[{"id":"CVE-2026-49253","title":"electerm: Path Traversal in Zmodem and Trzsz Download Filename Handling","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.","status":"published","published":"2026-08-19T14:31:55.683Z","modified":"2026-10-29T02:30:39.365110733Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L","level":"high"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T15:45:07.060148Z"},{"id":"GHSA-38j7-23hf-9mhc","title":"electerm has Path Traversal in Zmodem and Trzsz Download Filename Handling","description":"### 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","status":"published","published":"2026-07-02T19:20:20Z","modified":"2026-07-02T19:41:33.209044Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L","level":"high"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T15:46:35.406455Z"}]}}
