GHSA-m6qr-m48x-3xhh found in npm/[email protected]
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 69/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, node.js
調査の方向性
まず、プロジェクトのnpm依存関係ファイルとlockfileを確認し、どのパッケージが[email protected]を取り込んでいるかを特定します。脆弱な依存関係をバージョン7.1.0以降にアップグレードし、lockfileに修正済みバージョンが反映されていることを確認します。issueではnpm audit fixまたはnpm install [email protected]が推奨されています。
索引モデルが issue の本文から書いたものです。
説明
GHSA-m6qr-m48x-3xhh found in npm/[email protected]
[!important]
Risk:1.36 (Low)
CVSS:8.3
Description
Impact
On Windows, when cross-spawn runs a command through cmd.exe, it quotes each argument and doubles the backslashes that precede a double quote or the end of the argument, so that they aren't taken as escaping the quote.
Since 7.0.4, 7.0.5 and 6.0.6, which changed the regular expressions to fix a ReDoS vulnerability (GHSA-3xgq-45jj-v275), backslash runs weren't doubled correctly: 7.0.4 didn't double them at all, and 7.0.5, 7.0.6 and 6.0.6 added only one backslash to each run. An argument with two or more backslashes before a double quote, or at its end, had its closing quote escaped, which let it split into extra arguments or swallow the next ones:
const spawn = require('cross-spawn');
// On Windows, the program received two arguments: `x\\` and `--evil`
spawn.sync('foo.cmd', ['x\\\\" --evil']);
The caller can't tell: the command still exits successfully and nothing is written to stderr. Even an ordinary directory path such as C:\some\dir\\ makes the caller's following arguments disappear.
Applications are affected if they pass untrusted input as arguments to a command that runs through cmd.exe on Windows, which includes every npm cmd-shim in node_modules/.bin. The impact depends on the program: one that accepts extra arguments may act on the injected ones, e.g. a tool called with --check receiving an injected --write, while one that rejects an unexpected argument fails instead. This doesn't allow running other commands. Other platforms aren't affected.
Patches
This is fixed in 7.1.0 and 6.0.7, which escape backslashes with a loop that handles any number of them in linear time.
Workarounds
Validate untrusted input so that only a safe subset is allowed.
Credits
MOXY Studio thanks Duong Bui Thai (LinkedIn) for privately reporting this vulnerability, and both @trackoor and @ogffx for independently reporting and fixing it in #188 and #190.
Affected component
The vulnerability is in pkg:npm/[email protected], found in artifacts pkg:oci/devguard-documentation?repository_url=ghcr.io/l3montree-dev/devguard-documentation&arch=amd64&tag=main-amd64.
Recommended fix
Upgrade to version 7.1.0 or later.
# Update all vulnerable npm packages
npm audit fix
# Update only this package
npm install [email protected]
Additional guidance for mitigating vulnerabilities
Visit our guides on devguard.org
See more details...
Path to component
%%{init: { 'theme':'base', 'themeVariables': {
'primaryColor': '#F3F3F3',
'primaryTextColor': '#0D1117',
'primaryBorderColor': '#999999',
'lineColor': '#999999',
'secondaryColor': '#ffffff',
'tertiaryColor': '#ffffff'
} }}%%
flowchart TD
Your_application(["Your application"]) --- pkg_npm_cross_spawn_7_0_6(["pkg:npm/[email protected]"])
classDef default stroke-width:2px
| Risk Factor | Value | Description |
|---|---|---|
| Vulnerability Depth | 1 |
The vulnerability is in a direct dependency of your project. |
| EPSS | 0.56 % |
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days. |
| EXPLOIT | Not available |
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database. There are no script kiddies exploiting this vulnerability. |
| CVSS-BE | 6.9 |
|
| CVSS-B | 8.3 |
- The vulnerability can be exploited over the network without needing physical access. - It is difficult for an attacker to exploit this vulnerability and may require special conditions. - An attacker does not need any special privileges or access rights. - No user interaction is needed for the attacker to exploit this vulnerability. |
More details can be found in DevGuard
Interact with this vulnerability
You can use the following slash commands to interact with this vulnerability:
👍 Reply with this to acknowledge and accept the identified risk.
/accept I accept the risk of this vulnerability, because ...
⚠️ Mark the risk as false positive: Use one of these commands if you believe the reported vulnerability is not actually a valid issue.
/component-not-present The vulnerable component is not included in the artifact.
/vulnerable-code-not-present The component is present, but the vulnerable code is not included or compiled.
/vulnerable-code-not-in-execute-path The vulnerable code exists, but is never executed at runtime.
/vulnerable-code-cannot-be-controlled-by-adversary Built-in protections prevent exploitation of this vulnerability.
/inline-mitigations-already-exist The vulnerable code cannot be controlled or influenced by an attacker.
🔁 Reopen the risk: Use this command to reopen a previously closed or accepted vulnerability.
/reopen ...
- 主要言語
- CSS
- スター
- 8
- フォーク
- 4
- 平均マージ
- 3日 18時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
l3montree-dev/devguard-documentation のほかの issue
-
cvss-severity:high devguard l3montree-cybersecurity/.../devguard-documentation pkg:devguard/l3montree-c.../devguard-documentation risk:low state:open
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
l3montree-dev/devguard-documentation#393 · コメント 1 件 ·
-
cvss-severity:high devguard l3montree-cybersecurity/.../devguard-documentation pkg:devguard/l3montree-c.../devguard-documentation risk:low state:open
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
l3montree-dev/devguard-documentation#392 · コメント 1 件 ·
-
cvss-severity:high devguard l3montree-cybersecurity/.../devguard-documentation pkg:oci/devguard-documen...ch=amd64&tag=main-amd64 risk:low state:open
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
l3montree-dev/devguard-documentation#382 · コメント 1 件 ·
-
cvss-severity:high devguard l3montree-cybersecurity/.../devguard-documentation pkg:devguard/l3montree-c.../devguard-documentation risk:low state:open
難易度 1/5 1時間未満 初心者へのやさしさ 48/100
l3montree-dev/devguard-documentation#395 · コメント 1 件 ·
-
cvss-severity:high devguard l3montree-cybersecurity/.../devguard-documentation pkg:devguard/l3montree-c.../devguard-documentation risk:low state:open
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
l3montree-dev/devguard-documentation#397 · コメント 1 件 ·
l3montree-dev/devguard-documentation の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ehmpathy/declapract-typescript-ehmpathy#960 ·
メンテナーはふだん 1 日以内に返信
-
LifetimeRemaining divides by zero when expireAfter is 0s, producing NaN disruption costs対応中かも @weirong-ui が今日担当しました。 オープンkind/bug needs-priority needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
kubernetes-sigs/karpenter#3728 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ci: migrate pinned macos-15 runners to macos-26 and macos-26-intel対応中かも @hawkingrei が今日担当しました。 オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
nowledge-co/hawdb#2224 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
hexlet-volunteers/hexlet-sicp#2092 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
buildkite/elastic-ci-stack-for-aws#2050 ·
メンテナーはふだん 1 日以内に返信