CVE-2026-49255: Electerm Electerm Has Command Injection Vulnerability
HIGHCVE-2026-49255 is a HIGH (CVSS 8.8) electerm has command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Electerm libraries in the npm ecosystem. The issue involves electerm has command injection in file system operations (rmrf, mv, cp). Remediation is available by upgrading affected packages to version 3.11.11.
CVE-2026-49255 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-49255
To remediate this vulnerability, upgrade all affected Electerm dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install electerm@3.11.11
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls electerm
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-49255, inspect your project dependencies using npm:
npm ls electerm
Analyze the terminal output to locate any version of Electerm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.11.11), your application is affected.
Note: The npm ls electerm command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Electerm, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-49255 Affected Electerm Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
electerm
|
npm |
< 3.11.11
|
3.11.11
|
References
Frequently Asked Questions
What is CVE-2026-49255?
Which Electerm versions are affected?
What version fixes CVE-2026-49255?
Is electerm affected?
What is the CVSS score of CVE-2026-49255?
What CWE is associated with CVE-2026-49255?
How can I check npm dependencies for CVE-2026-49255?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v5ff-xmfp-p245",
"modified" : "2026-07-02T19:22:31Z",
"published" : "2026-07-02T19:22:31Z",
"aliases" : [ "CVE-2026-49255" ],
"summary" : "electerm has Command Injection in File System Operations (rmrf, mv, cp)",
"details" : "### Impact\n\nA 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.\n\n**Vulnerable functions:**\n- `rmrf()` - Uses `rm -rf \"${path}\"` (double quotes, vulnerable to `\"` injection)\n- `mv()` - Uses `mv '${from}' '${to}'` (single quotes, vulnerable to `'` injection)\n- `cp()` - Uses `cp -r \"${from}\" \"${to}\"` (double quotes, vulnerable to `\"` injection)\n\n**Attack scenario:**\n1. Attacker controls a malicious SSH/SFTP server\n2. Server lists files with shell metacharacters in names (e.g., `file\"$(touch /tmp/pwned)\"`)\n3. Victim connects to the server and performs file operations (remote-to-local transfer, rename on conflict, etc.)\n4. The malicious filename is passed to `rmrf()`, `mv()`, or `cp()` without sanitization\n5. Shell metacharacters break out of the quoted argument and execute arbitrary commands\n\n**Impact includes:**\n- Arbitrary command execution as the electerm desktop user\n- Data exfiltration, malware installation, or system compromise\n- Both POSIX (bash) and Windows (PowerShell) platforms are affected\n\n### Patches\n\n- https://github.com/electerm/electerm/commit/aa778818843b9c083bd711cd04644d102fcb5a42\n\n### Workarounds\n\nIf upgrading is not immediately possible, users can mitigate this vulnerability by:\n1. Only connecting to trusted SSH/SFTP servers\n2. Avoiding remote-to-local file transfers from untrusted sources\n3. Not using the \"rename on conflict\" option when downloading folders from untrusted servers\n4. Manually verifying filenames before performing file operations",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "electerm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.11.11"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.11.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/electerm/electerm/security/advisories/GHSA-v5ff-xmfp-p245"
}, {
"type" : "WEB",
"url" : "https://github.com/electerm/electerm/commit/aa778818843b9c083bd711cd04644d102fcb5a42"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/electerm/electerm"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-02T19:22:31Z",
"nvd_published_at" : null
}
}