ZX Allows Environment Variable Injection for dotenv API

説明

Impact

This vulnerability is an Environment Variable Injection issue in dotenv.stringify, affecting google/zx version 8.3.1.

An attacker with control over environment variable values can inject unintended environment variables into process.env. This can lead to arbitrary command execution or unexpected behavior in applications that rely on environment variables for security-sensitive operations. Applications that process untrusted input and pass it through dotenv.stringify are particularly vulnerable.

Patches

This issue has been patched in version 8.3.2. Users should immediately upgrade to this version to mitigate the vulnerability.

Workarounds

If upgrading is not feasible, users can mitigate the vulnerability by sanitizing user-controlled environment variable values before passing them to dotenv.stringify. Specifically, avoid using ", ', and backticks in values, or enforce strict validation of environment variables before usage.

References

基本情報

タイプ
reviewed
深刻度
medium
GitHub 上のアドバイザリ
アドバイザリを開く ↗
リポジトリのアドバイザリ
リポジトリのアドバイザリを開く ↗
ソースコード
ソースを見る ↗
公開(アドバイザリ)
2025-02-03 22:34:08 UTC
更新
2025-02-04 17:29:13 UTC
GitHub レビュー済み
2025-02-03 22:34:08 UTC
NVD で公開
2025-02-03

EPSS Score

Score Percentile
0.06% 17.48%

CVSS Scores

Base score Version Severity Vector
5.2 3.1
CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H クリックして展開
攻撃ベクター (AV:A)
同一ビル内 LAN のような隣接ネットワーク上にいる必要があり、「どこからでもインターネット経由」とは限らない。
攻撃の複雑さ (AC:L)
攻撃者が条件を満たせば、レース条件や珍しい構成に依存せずに再現しやすい。
必要な権限 (PR:L)
一般ユーザー権限があれば足り、管理者(root 相当)は不要。
ユーザーの関与 (UI:R)
インストールの許可、設定変更、悪意あるファイルの実行など、人の一度の判断がトリガーになる。
スコープ (S:U)
影響は脆弱コンポーネントと同一のセキュリティ権限・信頼境界の内側に収まる。
機密性への影響 (C:N)
機微情報の漏えいは想定しにくい。
完全性への影響 (I:N)
改ざん・なりすましによる信頼毀損は軽微か、想定されない。
可用性への影響 (A:H)
長時間のサービス停止、データ損壊による復旧不能に近い状態など、利用者に著しい不便を与えうる。

Identifiers

CWEs

CWE id Name
CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

Credits

  • arkark (finder)

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
npm zx = 8.3.1 8.3.2

References

cvelogic Threat Intelligence