Loading advisory.
Loading advisory.
electerm has Command Injection in File System Operations (rmrf, mv, cp)
A command injection vulnerability exists in electerm's file system operations (rmrf, mv, cp) in src/app/lib/fs.js. These functions construct shell commands by interpolating file paths directly into command strings without escaping shell metacharacters.
Published 2026-07-02 19:22 UTC · Modified 2026-08-25 02:04 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score.
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| electerm | npm | < 3.11.11 | 3.11.11 | npm install electerm@3.11.11 |
A command injection vulnerability exists in electerm's file system operations (rmrf, mv, cp) in src/app/lib/fs.js. These functions construct shell commands by interpolating file paths directly into command strings without escaping shell metacharacters.
Vulnerable functions:
rmrf() - Uses rm -rf "${path}" (double quotes, vulnerable to " injection)
mv() - Uses mv '${from}' '${to}' (single quotes, vulnerable to ' injection)
cp() - Uses cp -r "${from}" "${to}" (double quotes, vulnerable to " injection)
Attack scenario:
Attacker controls a malicious SSH/SFTP server
Server lists files with shell metacharacters in names (e.g., file"$(touch /tmp/pwned)")
Victim connects to the server and performs file operations (remote-to-local transfer, rename on conflict, etc.)
The malicious filename is passed to rmrf(), mv(), or cp() without sanitization
Shell metacharacters break out of the quoted argument and execute arbitrary commands
Impact includes:
Arbitrary command execution as the electerm desktop user
Data exfiltration, malware installation, or system compromise
Both POSIX (bash) and Windows (PowerShell) platforms are affected
https://github.com/electerm/electerm/commit/aa778818843b9c083bd711cd04644d102fcb5a42
If upgrading is not immediately possible, users can mitigate this vulnerability by:
Only connecting to trusted SSH/SFTP servers
Avoiding remote-to-local file transfers from untrusted sources
Not using the "rename on conflict" option when downloading folders from untrusted servers
Manually verifying filenames before performing file operations
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
One EPSS score on record: 0.008 on 2026-11-24.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.008 | first score | v2026.06.15 |