← Back to Pull requests

chore(deps): bump cross-spawn from 7.0.6 to 7.1.2 #3307

Open
unknown opened this pull request with 650 lines diff across 8 files
View on GitHub
unknown unknown commented on Dec 01, 2026 14:38 UTC
Author

Bumps cross-spawn from 7.0.6 to 7.1.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/moxystudio/node-cross-spawn/releases">cross-spawn's releases</a>.</em></p>
<blockquote>
<h2>v7.1.2</h2>
<h2>Bug fixes</h2>
<ul>
<li><strong>Batch files found in <code>PATH</code> see their own directory again</strong> (<a href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/203">#203</a>, <a href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/204">#204</a>). Since 7.1.0, a batch file run by its name, e.g. <code>gradle</code>, got the current directory in <code>%~dp0</code> on Windows, which broke batch files that use it to find their own files, such as Gradle's (<code>Unable to access jarfile</code>). Batch files are now run by the path they resolved to.</li>
</ul>
<h2>v7.1.1</h2>
<h2>Security</h2>
<p>This release fixes a command injection vulnerability that affects Windows only (GHSA-w3gc-668g-rf8f, high).</p>
<p>7.1.0 fixed how arguments are escaped for batch files, but that escaping only applied when cross-spawn detected that the command was a batch file. When the command wasn't written as a plain program name or path, e.g. it contained double quotes or a space, cross-spawn could miss that <code>cmd.exe</code> would run a batch file, and escape the arguments for a regular program instead, which allowed running arbitrary commands.</p>
<p>Please upgrade. <code>cross-spawn@6</code> users can upgrade to 6.0.8.</p>
<h2>Behaviour change</h2>
<p>On Windows, commands that run through <code>cmd.exe</code> are now always quoted. As on other platforms, the command must be the name or path of a single program, with its arguments passed in <code>args</code>: <code>spawn('npm install')</code> now fails with <code>ENOENT</code> instead of running <code>npm</code> with <code>install</code>. Also, <code>cmd.exe</code>'s message for a command it can't find now shows the command in quotes, e.g. <code>'&quot;foo&quot;' is not recognized as an internal or external command</code>. See the <a href="https://github.com/moxystudio/node-cross-spawn#windows-argument-escaping">Windows argument escaping</a> section of the README.</p>
<h2>v7.1.0</h2>
<h2>Security</h2>
<p>This release fixes two vulnerabilities that affect Windows only:</p>
<ul>
<li><strong>Command injection when spawning batch files</strong> (GHSA-ghv9-86vm-4v8m, high). Arguments passed to batch files outside <code>node_modules/.bin</code>, such as <code>npm.cmd</code> or globally installed package shims, could break out of their quotes and run arbitrary commands. <code>%VAR%</code> and <code>!VAR!</code> could also be expanded in some environments.</li>
<li><strong>Argument injection via backslashes before a double quote</strong> (GHSA-m6qr-m48x-3xhh, medium). Since 7.0.4, arguments with two or more backslashes before a double quote, or at their end, could split into extra arguments or swallow the following ones.</li>
</ul>
<p>Please upgrade. <code>cross-spawn@6</code> users can upgrade to 6.0.7.</p>
<p>Thanks to Duong Bui Thai for privately reporting both, to <a href="https://github.com/mohd-akram"><code>@​mohd-akram</code></a> for reporting the batch file injection in <a href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/171">#171</a>, and to <a href="https://github.com/trackoor"><code>@​trackoor</code></a> and <a href="https://github.com/ogffx"><code>@​ogffx</code></a> for independently reporting and fixing the backslash issue in <a href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/188">#188</a> and <a href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/190">#190</a>.</p>
<h2>Behaviour changes</h2>
<p>These only affect Windows, when a command runs through <code>cmd.exe</code>, i.e. batch files and other non-executable commands:</p>
<ul>
<li><strong>Line breaks now throw a <code>TypeError</code>.</strong> <code>cmd.exe</code> can't escape them, so arguments with line breaks used to be silently cut short. Both <code>spawn()</code> and <code>spawn.sync()</code> now throw synchronously instead.</li>
<li><strong>Inner double quotes are escaped as <code>&quot;&quot;</code> for batch files.</strong> Programs called by batch files that don't follow the Microsoft C runtime conventions, such as those written in Go or that use <code>CommandLineToArgvW</code>, may now split arguments containing double quotes differently.</li>
<li><strong><code>cmd.exe</code> runs with <code>/e:on /v:off</code>.</strong> This also applies to the batch file itself, e.g. one relying on delayed expansion being enabled in the registry.</li>
<li><strong>Batch files that read an argument unquoted with <code>%~1</code> remain unsafe</strong>, as they always were. Please quote it, e.g. <code>&quot;%~1&quot;</code>, or forward the arguments with <code>%*</code>.</li>
</ul>
<p>Please see the new <a href="https://github.com/moxystudio/node-cross-spawn#windows-argument-escaping">Windows argument escaping</a> section of the README.</p>
<h2>Other changes</h2>
<ul>
<li>Close the file descriptor when reading a shebang fails (<a href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/187">#187</a>). Thanks to <a href="https://github.com/xiehuanyi"><code>@​xiehuanyi</code></a>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md">cross-spawn's changelog</a>.</em></p>
<blockquote>
<h3><a href="https://github.com/moxystudio/node-cross-spawn/compare/v7.1.1...v7.1.2">7.1.2</a> (2026-11-29)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>run batch files by their resolved path on Windows (<a href="https://github.com/moxystudio/node-cross-spawn/commit/fe027b8a594c1260c45b1d1d3e5c543f2d9e8c57">fe027b8</a>), closes <a href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/203">#203</a></li>
</ul>
<h3><a href="https://github.com/moxystudio/node-cross-spawn/compare/v7.1.0...v7.1.1">7.1.1</a> (2026-11-28)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>always quote commands run through cmd.exe (<a href="https://github.com/moxystudio/node-cross-spawn/commit/d0ead352a7380492cbb0f6548fa86f19448323c9">d0ead35</a>)</li>
</ul>
<h2><a href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.6...v7.1.0">7.1.0</a> (2026-11-28)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>close the file descriptor when reading a shebang fails (<a href="https://github.com/moxystudio/node-cross-spawn/commit/9924b880434f771b2bfdb341cb567ea0d2acbe9e">9924b88</a>)</li>
<li>escape commands and arguments safely when running them through cmd.exe (<a href="https://github.com/moxystudio/node-cross-spawn/commit/244ffeaa8473de0080c93ebbf779bb953b94114b">244ffea</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/moxystudio/node-cross-spawn/commit/9bfd202a902078177b7e80d5eed4514ee6efc2d0"><code>9bfd202</code></a> chore(release): 7.1.2</li>
<li><a href="https://github.com/moxystudio/node-cross-spawn/commit/fe027b8a594c1260c45b1d1d3e5c543f2d9e8c57"><code>fe027b8</code></a> fix: run batch files by their resolved path on Windows</li>
<li><a href="https://github.com/moxystudio/node-cross-spawn/commit/f408280b07671b1c24d22c7282259016da80403a"><code>f408280</code></a> chore(release): 7.1.1</li>
<li><a href="https://github.com/moxystudio/node-cross-spawn/commit/d0ead352a7380492cbb0f6548fa86f19448323c9"><code>d0ead35</code></a> fix: always quote commands run through cmd.exe</li>
<li><a href="https://github.com/moxystudio/node-cross-spawn/commit/a03242e369749823a3c9fa120830da8e65b86c2c"><code>a03242e</code></a> chore: upgrade dev dependencies</li>
<li><a href="https://github.com/moxystudio/node-cross-spawn/commit/515dc55a97592a3d96745b8ed47d084baff00f1f"><code>515dc55</code></a> chore(release): 7.1.0</li>
<li><a href="https://github.com/moxystudio/node-cross-spawn/commit/4fcac7b265b9b3603e6a6bb9d2eefe0efa3472f4"><code>4fcac7b</code></a> docs: document Windows argument escaping and its limitations</li>
<li><a href="https://github.com/moxystudio/node-cross-spawn/commit/244ffeaa8473de0080c93ebbf779bb953b94114b"><code>244ffea</code></a> fix: escape commands and arguments safely when running them through cmd.exe</li>
<li><a href="https://github.com/moxystudio/node-cross-spawn/commit/9924b880434f771b2bfdb341cb567ea0d2acbe9e"><code>9924b88</code></a> fix: close the file descriptor when reading a shebang fails</li>
<li><a href="https://github.com/moxystudio/node-cross-spawn/commit/462a846b96da92565b0ff62ace437b47ea63e75a"><code>462a846</code></a> test: support unit tests next to source files</li>
<li>Additional commits viewable in <a href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.6...v7.1.2">compare view</a></li>
</ul>
</details>
<details>
<summary>Install script changes</summary>
<p>This version adds <code>prepare</code> script that runs during installation. Review the package contents before updating.</p>
</details>
<br />

![Dependabot compatibility score](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR

  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it

  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency

  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)

  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)

  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

  • You can disable automated security fix PRs for this repo from the Security Alerts page.

    </details>

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: mrgrain Review duration: 1024m
    All Vouch review confidence checks passed
    Residual risk 0.28 = Change Risk (0.52) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #3307"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 27.7% · Safe to merge
    27.7%