Skip to content
Critical 9.8 DevOps / CI-CD Other

Command Injection in electerm

CVE-2026-41501 First seen on SecPulse

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.

What is the problem

Command Injection in runLinux() function of electerm.

Affected scope

In github.com/elcterm/electerm/npm/install.js:130.

Severity

Critical, with CVSS score 9.8 and vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

How to fix

Upgrade to electerm version 3.3.8 or later using npm install -g electerm.

Workaround

No workaround available.

Detection

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サイト運営企業において

攻撃者がECシステムのサーバー上で任意のコマンドを実行し、顧客データを改ざんまたは削除する可能性がある。

開発運用が内製化されている中小企業

社員が利用する開発環境を悪用し、機密情報を外部に漏洩させる可能性がある。

クラウドベースの業務アプリケーションを提供する企業

顧客に提供するアプリケーションのソースコードが攻撃者により変更され、悪意のあるコードが配布されるリスクがある。

Recommended action

最新バージョンに更新し、不正なリリースメタデータを監視することでリスクを軽減する。

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposureidentify
    grep -r 'electerm' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で electerm を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Match against affected rangeverify
    Confirm if version satisfies `<=3.2.0`

    Step 1 で見つかったバージョンが影響範囲 <=3.2.0 に該当するか照合。本番で稼働中ならインシデント扱い。

  3. 6
    Apply patchpatch
    Upgrade electerm to > 3.2.0

    ステージング環境で > 3.2.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 3 で見つけた異常検知の続報チェックを含めること。

  4. 7
    Post-deployment verificationverify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 3 と同じログクエリでアラート再発が無いか継続監視。

Affected packages

PackageAffected → Fixed
npmelecterm
< 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

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details