### 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
### 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
Update electerm to 3.11.11 if you use the affected versions. Test the change in a non-production environment first.
Local check
hol-guard supply-chain scanelecterm has Path Traversal in Zmodem and Trzsz Download Filename Handling affects electerm (npm). Severity is high. ### 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
AI coding agents often install or upgrade packages automatically in npm. A high vulnerability in a dependency can be pulled into a project through a normal install or update without a human reviewing the change, expanding the blast radius from a single package to every agent workspace that depends on it.
| Package | Affected range | Fixed version |
|---|---|---|
| electermnpm | <=3.11.0 | 3.11.11 |
Fixed versions are reported by the source feed; confirm compatibility before updating.
Reported by GitHub Security Advisories (ghsa).
HOL Guard can help your team review package activity against supported protection paths.
Explore HOL GuardUpdate electerm to 3.11.11 if you use the affected versions. Test the change in a non-production environment first.
Local check
hol-guard supply-chain scanelecterm has Path Traversal in Zmodem and Trzsz Download Filename Handling affects electerm (npm). Severity is high. ### 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
AI coding agents often install or upgrade packages automatically in npm. A high vulnerability in a dependency can be pulled into a project through a normal install or update without a human reviewing the change, expanding the blast radius from a single package to every agent workspace that depends on it.
| Package | Affected range | Fixed version |
|---|---|---|
| electermnpm | <=3.11.0 | 3.11.11 |
Fixed versions are reported by the source feed; confirm compatibility before updating.
Reported by GitHub Security Advisories (ghsa).
HOL Guard can help your team review package activity against supported protection paths.
Explore HOL Guard