CVE-2026-49255
Published:July 02, 2026
Updated:July 05, 2026
Impact 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: 1. Attacker controls a malicious SSH/SFTP server 2. Server lists files with shell metacharacters in names (e.g., "file"$(touch /tmp/pwned)"") 3. Victim connects to the server and performs file operations (remote-to-local transfer, rename on conflict, etc.) 4. The malicious filename is passed to "rmrf()", "mv()", or "cp()" without sanitization 5. 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 Patches - https://github.com/electerm/electerm/commit/aa778818843b9c083bd711cd04644d102fcb5a42 Workarounds If upgrading is not immediately possible, users can mitigate this vulnerability by: 1. Only connecting to trusted SSH/SFTP servers 2. Avoiding remote-to-local file transfers from untrusted sources 3. Not using the "rename on conflict" option when downloading folders from untrusted servers 4. Manually verifying filenames before performing file operations
Affected Packages
https://github.com/electerm/electerm.git (GITHUB):
Affected version(s) >=v0.0.1 <v3.11.11Fix Suggestion:
Update to version v3.11.11electerm (NPM):
Affected version(s) >=0.1.0 <3.11.11Fix Suggestion:
Update to version 3.11.11Related Resources (3)
Do you need more information?
Contact UsCVSS v4
Base Score:
8.7
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
PASSIVE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
HIGH
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
8.8
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Weakness Type (CWE)
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')