# CVE-2026-49255: electerm: Command Injection in File System Operations (rmrf, mv, cp)

> A malicious SSH or SFTP server can trigger arbitrary command execution in electerm via crafted filenames during file operations, allowing attackers to compromise the user's system.

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 19 Aug 2026
- **Updated:** 25 Aug 2026
- **Also known as:** GHSA-v5ff-xmfp-p245

## What is CVE-2026-49255?

CVE-2026-49255 is a high-severity command injection vulnerability in electerm, published on 19 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

electerm is an open-sourced terminal/ssh/sftp/telnet/serialport/RDP/VNC/Spice/ftp client. Prior to 3.11.11, electerm constructs operating system commands in src/app/lib/fs.js by interpolating untrusted file paths into the rmrf(), mv(), and cp() functions. A malicious SSH or SFTP server can provide a filename containing quote characters and shell metacharacters, and a victim can cause that filename to reach the affected operation during remote-to-local transfer, conflict renaming, copying, moving, or removal. The generated `rm -rf`, mv, `cp -r`, PowerShell Remove-Item, Move-Item, or Copy-Item command can then interpret the filename as shell syntax. This allows arbitrary command execution with the electerm desktop user's privileges on POSIX and Windows systems, enabling data exfiltration, file modification, malware installation, or denial of service. This issue is fixed in version 3.11.11.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2026-49255?

2 open source packages ship an affected version, including electerm.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `electerm` | npm | All versions | 3.11.11 |
| `electerm` | npm | All versions | 3.11.11 |

## How do I fix CVE-2026-49255?

Upgrade electerm to 3.11.11 or later.

## Is CVE-2026-49255 being exploited?

There is no known exploitation of CVE-2026-49255 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-49255 and fix it if it is affected.

What it is: CVE-2026-49255 is a high-severity command injection vulnerability in electerm, published on 19 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-49255 in the wild and no public exploit code.

Affected packages and fixed versions:
- electerm (npm): affected all versions; fixed in 3.11.11
- electerm (npm): affected all versions; fixed in 3.11.11

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-49255/ (Markdown: https://insights.sbomify.com/CVE-2026-49255/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-49255
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-49255
- OSV: https://osv.dev/vulnerability/CVE-2026-49255

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-49255/
Summaries are generated and may contain mistakes; the official description above is the record.
