Skip to main content

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

HIGH

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

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

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.

Check my package-lock.json

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

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 (147 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, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: npm (1).

PackageFixed In
electerm npm · Affected: 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. 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

CVSS Score
8.8

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.79%
EPSS percentile: 52.8

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

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-83816
    HIGH

    CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE

  • 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

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json