CVE-2026-49255 — electerm has Command Injection in electerm
electerm has Command Injection in File System Operations (rmrf, mv, cp)
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.79%). Schedule for your next planned update.
Does your project use an affected electerm version?
Paste your package-lock.json to check it for CVE-2026-49255 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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()- Usesrm -rf "${path}"(double quotes, vulnerable to"injection)mv()- Usesmv '${from}' '${to}'(single quotes, vulnerable to'injection)cp()- Usescp -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(), orcp()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
Patches
Workarounds
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
Advisory Timeline
- First published July 2, 2026 (147 days ago).
- Last revised July 2, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install electerm@3.11.11
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: npm (1).
| Package | Fixed In |
|---|---|
| electerm npm · Affected: All versions | 3.11.11 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-78OS Command InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
References
Frequently Asked Questions
- What is CVE-2026-49255?
- electerm has Command Injection in File System Operations (rmrf, mv, cp). This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
- How do I check if my project is affected by CVE-2026-49255?
- CVE-2026-49255 affects electerm. It has a 0.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-49255 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is an above-median EPSS score — 52.8% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-41501CRITICAL
electerm has Command Injection via runLinux funtion
- CVE-2026-43940CRITICAL
Electerm runWidget has a path traversal that leads to arbitrary code execution
- CVE-2026-45058CRITICAL
Electerm: Importing unsafe bookmark data could lead to unsafe operation when clicking local type bookmark
- CVE-2026-43944CRITICAL
Electerm users can run dangrous code through link or command line
- CVE-2026-41500CRITICAL
electerm: electerm_install_script_CommandInjection Vulnerability Report
- CVE-2026-83816HIGH
CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE
- CVE-2026-43941HIGH
Electerm has an unvalidated shell.openExternal that allows arbitrary protocol execution via terminal link click
- CVE-2026-43943HIGH
Electerm Security Vulnerability: RCE via malicious SSH server filename in openFileWithEditor