Loading...
Skip to main content

CVE-2026-49255 — electerm has Command Injection in electerm — CVE...

HIGH

electerm has Command Injection in File System Operations (rmrf, mv, cp)

Published July 2, 2026Updated July 2, 2026Source: osv

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()` - 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

Advisory Timeline

  • First published July 2, 2026 (102 days ago).
  • Last revised July 2, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update electerm to 3.11.11 or later
npm install electerm@3.11.11

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: npm (1).

PackageEcosystemAffectedFixed In
electerm
npm
All versions3.11.11

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-78
    OS Command InjectionMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

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. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-49255 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.8

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-v5ff-xmfp-p245

Related CVEs

  • CVE-2026-41501
    CRITICAL

    electerm has Command Injection via runLinux funtion

  • CVE-2026-43940
    CRITICAL

    Electerm runWidget has a path traversal that leads to arbitrary code execution

  • CVE-2026-45058
    CRITICAL

    Electerm: Importing unsafe bookmark data could lead to unsafe operation when clicking local type bookmark

  • CVE-2026-43944
    CRITICAL

    Electerm users can run dangrous code through link or command line

  • CVE-2026-41500
    CRITICAL

    electerm: electerm_install_script_CommandInjection Vulnerability Report

  • CVE-2026-43941
    HIGH

    Electerm has an unvalidated shell.openExternal that allows arbitrary protocol execution via terminal link click

  • CVE-2026-43943
    HIGH

    Electerm Security Vulnerability: RCE via malicious SSH server filename in openFileWithEditor

  • CVE-2026-107384
    HIGH

    MariaDB Connector/Node.js: SQL injection through object keys in SET expansion (permitSetMultiParamEntries)

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies