Command Injection in electerm
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.
There is a critical security issue in the electerm software, which may allow attackers to execute arbitrary commands on the system. This affects users who run npm install -g electerm on Linux. The issue is already fixed, and updating to the latest software version will prevent potential exploitation. Similar major security concerns, like OpenSSL's Heartbleed, have shown that updating to a patched version mitigates risks effectively.
A command injection vulnerability in the runLinux() function affects versions <=3.2.0 of electerm, allowing attackers to execute exec("rm -rf ...") with malicious remote version strings. The fix is available in version 3.3.8, and can be applied with npm install -g electerm. No workarounds are available. The vulnerability is classified as CWE-77, supporting remote attack without authentication or user interaction.
Command Injection in runLinux() function of electerm.
In github.com/elcterm/electerm/npm/install.js:130.
Critical, with CVSS score 9.8 and vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
Upgrade to electerm version 3.3.8 or later using npm install -g electerm.
No workaround available.
Monitor for unauthorized exec calls, especially exec("rm -rf") strings, in logs.
Related past incidentsSimilar incidents extracted from past CVEs
Similar command injection vulnerability affecting Node.js applications via improperly sanitized inputs.
Kubernetes API server command injection vulnerability via crafted requests, affecting multiple container deployments.
Command injection flaw in Composer, allowing remote attackers to execute commands in PHP environments.
If this happens at your companyExpected impact per business scenario
攻撃者がECシステムのサーバー上で任意のコマンドを実行し、顧客データを改ざんまたは削除する可能性がある。
社員が利用する開発環境を悪用し、機密情報を外部に漏洩させる可能性がある。
顧客に提供するアプリケーションのソースコードが攻撃者により変更され、悪意のあるコードが配布されるリスクがある。
最新バージョンに更新し、不正なリリースメタデータを監視することでリスクを軽減する。
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1
Identify exposureidentify
grep -r 'electerm' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
electermを grep し、稼働しているサービス・バージョンを把握する。 -
2
Match against affected rangeverify
Confirm if version satisfies `<=3.2.0`Step 1 で見つかったバージョンが影響範囲
<=3.2.0に該当するか照合。本番で稼働中ならインシデント扱い。 -
6
Apply patchpatch
Upgrade electerm 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:130. The runLinux() function appends attacker-controlled remote version strings directly into an exec("rm -rf ...") 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