/

CVE-2026-73224

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78) in electerm SFTP Client

CVE-2026-73224

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary Command Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

electerm contains an OS command injection vulnerability in the SFTP file-properties workflow. A malicious FTP or SFTP server may control a folder name that is incorporated into a shell command, allowing arbitrary commands to execute when a user downloads the folder and calculates its size.

Affected context

The issue occurs in electerm's SFTP file-information workflow when the application calculates the size of a downloaded folder. It is relevant when a user connects to a malicious or compromised FTP/SFTP server, downloads a crafted folder, and invokes the Properties and Calculate Size actions. The vulnerable behavior is associated with releases before the fix in 3.15.120.

Exploit preconditions

  • Attack surface: Local command execution through the electerm desktop client
  • Required access: The victim must connect to, or interact with, a malicious or compromised FTP/SFTP server
  • Trigger point: The victim downloads a crafted folder and invokes Properties followed by Calculate Size
  • Why exploitation is possible: A server-controlled folder name is inserted into a shell command without safely escaping shell metacharacters and single quotes

Why this happens

The vulnerability results from constructing a shell command by concatenating attacker-influenced filesystem data into a command string. The folder name is not treated as untrusted data when passed to the shell, allowing shell syntax embedded in that value to alter command interpretation. This is an instance of CWE-78: Improper Neutralization of Special Elements used in an OS Command.

Potential impact

  • An attacker may execute arbitrary commands with the privileges of the electerm process
  • Local files and credentials could be accessed or modified
  • The user's workstation may be compromised
  • Malware or persistence mechanisms could be installed
  • Connected systems and stored session data may be exposed

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from filesystem operations and reducing trust in remote names.

Common defensive patterns include:

  • Use native filesystem APIs to calculate directory sizes instead of invoking a shell
  • If a subprocess is unavoidable, pass arguments as an array with shell interpretation disabled
  • Apply strict handling and validation to remote filenames and directory names
  • Avoid string concatenation when constructing commands from external data
  • Run the client with least privilege and limit access to sensitive local resources
  • Restrict interaction with untrusted FTP and SFTP servers where practical

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis rules for shell execution APIs receiving concatenated or interpolated values
  • Code review checks for subprocess calls involving remote filenames or archive paths
  • Tests using adversarial filenames containing shell metacharacters and quote characters
  • Policies requiring argument-array process execution with shell mode disabled
  • Automated code review tools that flag command construction from external input

Sources

SourceLink
github.comgithub.com/electerm/electerm/commit/36b16fb66936bb7c65fbcdf706dfd1b77f0750a7
github.comgithub.com/electerm/electerm/releases/tag/v3.15.120
github.comgithub.com/electerm/electerm/security/advisories/GHSA-4wx8-4m69-8rw5

Frequently asked

questions

It can be triggered through a malicious or compromised FTP/SFTP server, but user interaction with the server and the affected folder workflow is generally required.

The attacker needs control of, or the ability to influence, a server that the victim connects to. The victim must then download the crafted folder and calculate its size.

Avoid shell commands for filesystem operations. Use native APIs or invoke subprocesses with fixed executables, separate arguments, and shell interpretation disabled.

Treat remote filenames as untrusted input, review all process execution paths, test with hostile names, and enforce least privilege for desktop clients.

Find out what's already
exploitable in your codebase.