Command Injection in electerm-project
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
A vulnerability in the electerm terminal client allows malicious actors to inject harmful commands into computers, particularly impacting Mac OS users installing via npm. This could lead to partial system takeover. The issue has been patched in the latest version 3.3.8, and users should update immediately.
The vulnerability in electerm involves a command injection in the runMac() function of github.com/elcterm/electerm/npm/install.js:150. Here, the attacker-controlled releaseInfo.name is inserted into an exec("open ...") command without proper validation. Affected versions are <=3.2.0, patched in 3.3.8. There are no workarounds; it is critical to update via npm install -g electerm. Detection is challenging, thus continuous monitoring of applied system logs is advised.
Command injection vulnerability in electerm's runMac() function.
github.com/elcterm/electerm/npm/install.js:150.
Critical severity (CVSS v3: 9.8, remote exploitation without authentication).
Update to electerm version 3.3.8 via npm.
No workaround available.
Monitoring system logs for unusual entries post-update.
Related past incidentsSimilar incidents extracted from past CVEs
A similar sudo privilege escalation vulnerability affecting OS systems without proper input validation.
Shellshock bug, another shell command injection vulnerability resulting from improper input handling.
Widely exploited vulnerability in Log4j for logging untrusted data, parallel to electerm's fault.
If this happens at your companyExpected impact per business scenario
Unauthorized command execution could compromise sensitive source code and configuration files.
Attackers may execute arbitrary commands, leading to potential server compromise.
Unauthorized access and command execution could disrupt operations and lead to data integrity issues.
Promptly update electerm to version 3.3.8 and monitor systems for anomalies.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1
Identify exposureidentify
grep -r 'electerm-project' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
electerm-projectを grep し、稼働しているサービス・バージョンを把握する。 -
2
Match against affected rangeverify
Confirm if version satisfies `<=3.2.0`Step 1 で見つかったバージョンが影響範囲
<=3.2.0に該当するか照合。本番で稼働中ならインシデント扱い。 -
6
Apply patchpatch
Upgrade electerm-project to > 3.2.0ステージング環境で > 3.2.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 3 で見つけた異常検知の続報チェックを含めること。
-
7
Post-deployment verificationverify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 3 と同じログクエリでアラート再発が無いか継続監視。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| npmelecterm |
< 3.3.8→ 3.3.8 |
3.3.8 |
Original description The description as published by the source.
electerm is an open-sourced terminal/ssh/sftp/telnet/serialport/RDP/VNC/Spice/ftp client. Prior to version 3.3.8, a command injection vulnerability exists in github.com/elcterm/electerm/npm/install.js:150. The runMac() function appends attacker-controlled remote releaseInfo.name directly into an exec("open ...") command without validation. This issue has been patched in version 3.3.8.
Source: NIST National Vulnerability Database NVD GitHub Advisory
References
- advisory github.com
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- patch github.com
- web github.com
- web github.com