Skip to content

fix(deps): bump cross-spawn to 7.0.6 to fix ReDoS (CVE-2024-21538) - #484

Open
boazgarty wants to merge 1 commit into
ArduPilot:masterfrom
boazgarty:fix-cross-spawn-redos-cve-2024-21538
Open

boazgarty wants to merge 1 commit into
ArduPilot:masterfrom
boazgarty:fix-cross-spawn-redos-cve-2024-21538

Conversation

@boazgarty

Copy link
Copy Markdown

cross-spawn is pinned at ^5.1.0 (resolving to 5.1.0), which falls in the affected range of GHSA-3xgq-45jj-v275 / CVE-2024-21538, a ReDoS in cross-spawn's argument-escaping regex. OSV lists the affected ranges as [0, 6.0.6) and [7.0.0, 7.0.5); 7.0.6 carries no known advisories.

Scope, stated plainly

This is a devDependency with exactly one call site — test/e2e/runner.js spawns ./node_modules/.bin/nightwatch for the e2e suite, with arguments that come from the developer's own command line rather than untrusted input. This is not a remotely exploitable issue in the shipped application. It's dependency hygiene that clears a HIGH-severity alert SCA scanners raise against this repo. Flagging that up front so the severity label isn't mistaken for a runtime risk.

Verified before opening

  • npm run build (what Node CI runs on every PR) succeeds both at the unmodified base commit and at this one: exit 0 both times, same three webpack performance warnings, with the JsDataflashParser submodule checked out the way CI checks it out.
  • npm ci succeeds at this commit, confirming package.json and package-lock.json agree.
  • Behavioural equivalence at the real call site: the exact shape runner.js uses — spawn('./node_modules/.bin/<bin>', args, { stdio: 'inherit' }) with .on('exit') and .on('error') — was run under both 5.1.0 and 7.0.6, covering a relative-path bin shim with and without arguments, a missing binary (the ENOENT path), and arguments containing the shell metacharacters the patched regex parses. All four cases behave identically on both versions.
  • The e2e suite itself was NOT executed: nightwatch pulls in deasync, a native module that would not compile in the environment this patch was prepared in. Noting that rather than implying e2e was run.

On the diff size

package-lock.json also dedupes several nested cross-spawn copies that already requested ^7.x (under eslint, webpack-cli and default-gateway) onto the new top-level version — a lockfile-only effect of the bump, not a hand edit, called out so the diff size isn't a review surprise.

🤖 Generated with Claude Code

https://claude.ai/code/session_011RM8fJpwkTDgdKX42zHk6m

cross-spawn is pinned at ^5.1.0 (resolving to 5.1.0), which falls in the
affected range of GHSA-3xgq-45jj-v275 / CVE-2024-21538, a ReDoS in
cross-spawn's argument-escaping regex. OSV lists the affected ranges as
[0, 6.0.6) and [7.0.0, 7.0.5); 7.0.6 carries no known advisories.

Scope, stated plainly: this is a devDependency with exactly one call
site — test/e2e/runner.js spawns ./node_modules/.bin/nightwatch for the
e2e suite, with arguments that come from the developer's own command
line rather than untrusted input. This is not a remotely exploitable
issue in the shipped application; it is dependency hygiene that clears a
HIGH-severity alert SCA scanners raise against this repo.

Verified before opening:

- `npm run build` (what Node CI runs on every PR) succeeds both at the
  unmodified base commit and at this one: exit 0 both times, same three
  webpack performance warnings, with the JsDataflashParser submodule
  checked out the way CI checks it out.
- `npm ci` succeeds at this commit, confirming package.json and
  package-lock.json agree.
- Behavioural equivalence at the real call site: the exact shape
  runner.js uses — spawn('./node_modules/.bin/<bin>', args,
  { stdio: 'inherit' }) with .on('exit') and .on('error') — was run
  under both 5.1.0 and 7.0.6, covering a relative-path bin shim with and
  without arguments, a missing binary (the ENOENT path), and arguments
  containing the shell metacharacters the patched regex parses. All four
  cases behave identically on both versions.
- The e2e suite itself was NOT executed: nightwatch pulls in deasync, a
  native module that would not compile in the environment this patch was
  prepared in. Noting that rather than implying e2e was run.

package-lock.json also dedupes several nested cross-spawn copies that
already requested ^7.x (under eslint, webpack-cli and default-gateway)
onto the new top-level version — a lockfile-only effect of the bump, not
a hand edit, called out so the diff size isn't a review surprise.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011RM8fJpwkTDgdKX42zHk6m
boazgarty added a commit to boazgarty/verdictruntime-site that referenced this pull request Sep 19, 2026
Verified live against the GitHub API rather than inferred: five clean
CVE-fix PRs (one merged, four open) and two Semgrep rule PRs (both
open, described as "submitted", never "accepted").

Two PRs surfaced in the audit that are deliberately NOT counted here:
ArduPilot/UAVLogViewer#484 bumps cross-spawn, which is a devDependency
only in that project and so does not patch a production CVE; and
outline/outline#13729 is closed, and only wins get published. Both
exclusions follow the same reachability discipline that forced the
golang.org/x/crypto retractions.

Copy stays fully anonymized per the 2026-09-15 decision - no repo is
named anywhere public.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant