/

CVE-2026-134793

Severity:

HIGH RISK

(7.8)

OS Command Injection (CWE-78) in Electerm for Windows

CVE-2026-134793

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary command execution in the Electerm user's context

Severity:

HIGH RISK

(7.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 for Windows before 5.9.0 has an OS command injection flaw in folder-size calculation. If a victim requests the size of a folder whose name contains crafted Unicode quote characters, PowerShell code may run with the privileges of the Electerm user.

Affected context

The issue affects Electerm on Windows before 5.9.0 when folder names are incorporated into commands used by getFolderSizeWin() and calcLocal(). Names delivered through archives, WSL distributions, or SMB shares may be relevant if a victim later requests a folder-size calculation.

Exploit preconditions

  • Attack surface: Windows folder-size calculation in Electerm
  • Required access: An attacker must be able to provide or influence a file or folder name that Electerm processes
  • Trigger point: The victim requests a folder-size calculation for the affected item
  • Why exploitation is possible: Certain Unicode quote characters in the name can disrupt command quoting, allowing the name to be interpreted as part of a PowerShell command

Why this happens

The application incorporates file or folder names into an operating-system command without safely handling all characters that can affect command parsing. Unicode quote characters can undermine the quoting assumptions used by the Windows command construction logic. This is an OS command injection weakness, mapped to CWE-78: Improper Neutralization of Special Elements used in an OS Command.

Potential impact

  • PowerShell code could execute with the privileges of the Electerm user
  • An attacker may gain access to data or resources available to that user
  • The affected workstation could be compromised, depending on the user's permissions and environment

General mitigation guidance

Defensive patterns for this class of issue include:

  • Avoiding shell command construction when a library or direct API can perform the required operation
  • Passing arguments through APIs that keep executable names and arguments separate
  • Treating file and folder names as untrusted input, regardless of their source
  • Applying robust argument handling rather than relying on ad hoc quoting or character filtering
  • Running desktop applications with only the privileges they need

How teams detect issues like this

Review code that builds operating-system commands from paths or names, especially folder-size and file-management routines. Static analysis can flag shell execution APIs and data flowing from file names into command strings; code review can check whether arguments are passed separately and safely. Policies can restrict shell invocation where direct APIs are available, and endpoint monitoring may help identify unexpected PowerShell activity associated with the application.

Sources

SourceLink
github.comgithub.com/electerm/electerm/blob/v5.8.0/src/app/lib/fs.js#L106-L115
github.comgithub.com/electerm/electerm/blob/v5.8.0/src/client/components/sftp/file-info-modal.jsx#L183-L192
github.comgithub.com/electerm/electerm/commit/488b112d10dc21545f18284d4eb52db6dafb7f31
github.comgithub.com/electerm/electerm/pull/4710
github.comgithub.com/electerm/electerm/releases/tag/v5.9.0
github.comgithub.com/electerm/electerm/security/advisories/GHSA-h4v2-5hq4-wc2g
vulncheck.comvulncheck.com/advisories/electerm-before-5.9.0-os-command-injection-via-unicode-quotes-in-powershell

Frequently asked

questions

The described trigger is local to the victim's Electerm session, but an attacker may be able to deliver a crafted name through an archive, WSL distribution, or SMB share.

The attacker needs a way to supply or influence a file or folder name that Electerm processes. The victim must request a folder-size calculation for the affected item.

Avoid passing names through a shell command string. Prefer direct APIs or process interfaces that keep arguments separate and handle them safely.

Treat names and paths from external sources as untrusted, review command-building code, and use static analysis and code-review policies to catch unsafe shell invocation patterns.

Find out what's already
exploitable in your codebase.