cross-spawn
Reasonable, with limits. 8th of 8 shell and process tools.
cross-spawn is a small drop-in replacement for Node's spawn and spawnSync that fixes Windows problems with PATHEXT, shebangs and argument escaping. It is still a core part of the npm tree, but it has had no release since November 2024. Requests to help maintain it and a Node 24 deprecation warning have gone unanswered, so execa or tinyexec is the better pick for new code.
Best for: Low-level tool authors who need spawn's exact API to behave correctly on Windows and nothing more.
Scores
Overall5.1
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 4.0, likely 3.0 to 5.0
It works and is everywhere, but it is a low-level primitive that has stalled, with an unfixed Node 24 warning and unanswered maintenance requests. For new work, execa (which wraps it) or tinyexec does the same job with a better API and active maintenance. Keep it where it already runs. Pick it directly only if you need spawn's exact signature.
- github.com/moxystudio/node-cross-spawn/issues/180: Maintenance has stalled
- google.18789066745.workers.dev/e18e/module-replacements/blob/main/docs/modules/execa.md: e18e points to tinyexec and nano-spawn as light process tools
- peers execa commitsLastYear: execa has 103 commits and a recent release, vs 5 commits here
GPT-6.2 Sol: 6.1, likely 4.9 to 7.3
cross-spawn still earns its place when a Node tool needs Windows compatibility and the native ChildProcess interface. Execa is the stronger default for new projects that want promise-based results, pipelines, and active maintenance. The range reflects how much the choice depends on the exact Windows commands a project runs and whether open fixes reach npm.
- e18e.dev/docs/replacements/cross-spawn: Independent comparison explains where the native ChildProcess interface is useful.
- github.com/sindresorhus/execa: Execa offers a broader API for scripts and process orchestration.
- github.com/moxystudio/node-cross-spawn/pulls: Windows and worker-thread fixes are still open.
- npm.latestPublishedAt, github.commitsLastYear, peers.execa: cross-spawn’s latest npm release is from November 2024, and Execa has a much faster maintenance cadence.
Needed by many4.1
How many developers need a tool for this job?
Claude Opus 5.5: 4.0, likely 3.0 to 5.0
Running child processes is a common need, but this project only does the low-level, cross-platform part of it. Mostly CLI and tooling authors who must support Windows need it directly. Most app developers reach it through execa or other tools, not by choosing it.
- github.com/moxystudio/node-cross-spawn: README scopes it to Windows fixes for spawn and spawnSync
- dependents packages: 14,155 packages build on it, mostly tooling
GPT-6.2 Sol: 4.2, likely 3.2 to 5.4
Running external programs is common in Node build tools, CLIs, and automation. The main reason to choose cross-spawn is to make those calls work on Windows. State of JavaScript shows broad Node use, but gives little indication of how many developers need that compatibility.
- 2025.stateofjs.com/en-US/other-tools: Node led the runtime question with 10,062 of 11,141 respondents.
- e18e.dev/docs/replacements/cross-spawn: Independent comparison identifies Windows support as the main reason to add the dependency.
Helps a lot6.0
How well does it do the job for those who need it?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
It does its narrow job well and is battle-tested on Windows. Its shebang support is limited, and it ships no types of its own. It has no promise API, output capture or error helpers, which execa and tinyexec provide. The unfixed DEP0190 warning on Node 24 is a visible flaw today.
- github.com/moxystudio/node-cross-spawn: Shebang support limited to #!/usr/bin/env program without args
- github.com/moxystudio/node-cross-spawn/issues/176: DEP0190 warning on Node 24, open with no response
- npm hasTypes: No bundled types
GPT-6.2 Sol: 7.0, likely 5.7 to 8.1
Version 7.0.6 keeps the familiar Node API and has short examples that are easy for developers and coding agents to follow. It covers common Windows launches, though users report a Node 24 warning in shell mode and Windows escaping edge cases. Execa offers promises, richer errors, and pipelines. Comparative performance and coding-agent accuracy are lightly evidenced.
- github.com/moxystudio/node-cross-spawn: Documents both spawn modes, Windows behavior, and shebang limits.
- github.com/moxystudio/node-cross-spawn/issues/176: User reports a deprecation warning after upgrading to Node 24.
- github.com/moxystudio/node-cross-spawn/pulls: Open fixes cover argument escaping, command shims, and worker-thread command lookup.
- github.com/sindresorhus/execa: Execa documents promise results, detailed errors, and subprocess pipelines.
- reddit.com/r/node/comments/156muca/crossspawn_vs_execa: Users discuss API trade-offs without reporting measured timings.
- raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/types/cross-spawn/index.d.ts: Community declarations reuse Node’s child-process types.
Holds up over time3.9
Will it still be a good choice in two years?
Claude Opus 5.5: 3.0, likely 2.0 to 4.0
There have been no releases in two years and only five commits in the last year. An April 2026 offer to help maintain it got no reply, and an issue about having a sole publisher is open. Because so much depends on it, someone would likely fork or take it over, but nobody has committed to that.
- npm latestPublishedAt: Last release 2024-11-18
- github commitsLastYear: 5 commits, 0 releases
- github.com/moxystudio/node-cross-spawn/issues/180: Offer to help maintain it is unanswered
- github.com/moxystudio/node-cross-spawn/issues: Open issues on sole publisher and Node version support
GPT-6.2 Sol: 4.7, likely 3.3 to 6.2
The API has been stable for years, but five commits in the last year and a two-year npm release gap put it behind Execa for maintenance. A community offer to help maintain the package remains open, and Execa 10 moved away from the dependency. The small API could age well, but the next release and the project’s maintenance capacity are uncertain.
- github.commitsLastYear, npm.latestPublishedAt, peers.execa: Five commits and a November 2024 publish, versus 103 commits and an October 2026 publish for Execa.
- github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md: The 7.x line dates to 2019, with long gaps between patches.
- github.com/moxystudio/node-cross-spawn/issues/180: An April 2026 offer to share maintenance and release work remains open.
- raw.githubusercontent.com/sindresorhus/execa/v9.6.1/package.json: Execa 9.6.1 used cross-spawn.
- raw.githubusercontent.com/sindresorhus/execa/v10.1.0/package.json: Execa 10.1.0 dropped the dependency.
Used widely7.4
How many use it, and is that growing?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It has 1.9M dependent repos and 1.4B downloads per 4 weeks, but almost all of that comes in through execa, ESLint-era tooling and similar packages. Its download ratio of about 3.1 is below the 4.1 median, so it is losing ground, while tinyexec grows much faster. Few new projects choose it directly.
- npm downloadsLast4Weeks: 1.40B now vs 444M a year ago, ratio ~3.1
- medianDownloadsRatio: Median is 4.1, so it is below the market
- dependents repos: 1.92M repos, the most in the category
- peers tinyexec downloads: tinyexec ratio ~8.4, a faster-growing alternative
GPT-6.2 Sol: 7.8, likely 6.3 to 9.0
The collector found 1.92 million dependent repositories and 14,155 dependent packages, with more observed repositories than Execa or ShellJS. Four-week installs grew 3.15× year over year, below the catalog median of 4.1×, which points to a loss of relative ground. Automated and transitive installs make the 1.40 billion total a poor estimate of how many projects choose it directly.
- dependents, peers.execa.dependentRepos, peers.ShellJS.dependentRepos: The collector found about twice as many dependent repositories as for Execa.
- npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo, medianDownloadsRatio: Downloads rose from 444 million to 1.40 billion against a 4.1× baseline.
- project.note, github.stars, bluesky.posts, hackerNews.stories: Heavy transitive use, 1,173 stars, and no matched stories or posts.
- github.com/kentcdodds/cross-env/blob/main/package.json: cross-env continues to install cross-spawn as a runtime dependency.
Vouched for6.6
Who stands behind it being good?
Claude Opus 5.5: 6.0, likely 4.0 to 7.0
Major tools such as execa depend on it, which is strong practical validation of how it behaves. It has no current survey presence, Hacker News or Bluesky discussion, or independent write-ups. Much of that endorsement is old.
- execa package.json: execa depends on cross-spawn
- hackerNews and bluesky: Zero stories and zero posts
- chromium.googlesource.com/devtools/devtools-frontend/+/90e4cbb731a00a4dc026c63f66bb58a32a2abd46/node_modules/cross-spawn/README.md: Vendored in Chromium DevTools' dependency tree
GPT-6.2 Sol: 7.2, likely 6.1 to 8.3
cross-env uses it to launch commands, Chromium DevTools vendors it, and a Debian packaging request cites a downstream need. These are concrete signs of trust in tooling. Recent independent comparisons cover the API trade-offs, while evidence on satisfaction and comparative performance remains thin.
- raw.githubusercontent.com/kentcdodds/cross-env/main/src/index.ts: cross-env calls cross-spawn in its command execution path.
- chromium.googlesource.com/devtools/devtools-frontend/%2B/refs/heads/chromium/7394/node_modules/cross-spawn: The Chromium DevTools source tree includes a vendored copy.
- bugs.debian.org/cgi-bin/bugreport.cgi?bug=1139969: A 2026 Debian packaging proposal cites a downstream need.
- e18e.dev/docs/replacements/cross-spawn: The e18e community compares its native process API with tinyexec’s awaitable result.
Safe5.6
How safe is it to depend on?
Claude Opus 5.5: 6.0, likely 4.0 to 7.0
It has one HIGH ReDoS advisory (CVE-2024-21538), which was fixed in 7.0.5 and 6.0.6, and nothing new since. It has only three small dependencies and an MIT licence. However, its Scorecard is 3.6, one person publishes it with no branch protection, and maintainers are unresponsive. That would slow any future fix in a package with huge transitive reach.
- nvd.nist.gov/vuln/detail/CVE-2024-21538: ReDoS fixed in 7.0.5/6.0.6
- scorecard score: 3.6, with Branch-Protection, Security-Policy and Token-Permissions at 0
- npm dependencies: 3 dependencies
- github.com/moxystudio/node-cross-spawn/issues: Open issue on sole-publisher risk
GPT-6.2 Sol: 5.2, likely 3.8 to 6.7
The MIT licence and three runtime dependencies keep the dependency footprint small. The one published high-severity advisory had a 7.x fix at disclosure and was backported to 6.x. The 3.6 Scorecard, reported single npm publisher, and open Windows argument-escaping reports limit confidence in release safeguards and in handling untrusted arguments.
- npm.license, npm.dependencies, scorecard: MIT, three runtime dependencies, and weak review, token-permission, and branch-protection checks.
- github.com/advisories/GHSA-3xgq-45jj-v275: The high-severity denial-of-service advisory lists 7.0.5 and 6.0.6 as patched.
- github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md: The 7.x patch dates to the time of disclosure.
- raw.githubusercontent.com/moxystudio/node-cross-spawn/v7.0.6/package.json: The release script invokes npm publish directly.
- github.com/moxystudio/node-cross-spawn/issues: The tracker lists open Windows escaping reports and a report of one npm publisher.
Good
- It has the same signature as child_process.spawn and spawnSync, so you can swap it in without changing your code.
- It handles Windows PATHEXT lookup, command shims and argument escaping, which plain spawn gets wrong.
- It is very widely used: execa and many CLI tools depend on it, so its behaviour is well tested.
- It is small, MIT licensed and has only three tiny dependencies.
Bad
- There has been no release since 7.0.6 in November 2024, and maintainers have not answered issues or offers of help.
- On Node 24 it triggers the DEP0190 deprecation warning about passing args with shell: true, and no fix has been released.
- It has no bundled types and no promise API. It is a raw spawn wrapper, while execa and tinyexec give you ergonomic results and errors.
- One person publishes it, and its OpenSSF Scorecard is weak (3.6), with no branch protection or security policy.
The numbers
- npm downloads, 4 weeks
- 1.4B ×3.1 in a year
- GitHub stars
- 1.2k
- Commits, 12 months
- 5
- npm version
- 7.0.6 Nov 2024
- Versions, 12 months
- 0
- Advisories, 24 months
- 0 of 1 ever
- OpenSSF Scorecard
- 3.6 out of 10, Nov 2026
- Licence
- MIT
Many packages install it, so most downloads are not a direct choice.
Read on 21 November 2026 from GitHub (moxystudio/node-cross-spawn), npm (cross-spawn), OSV and the OpenSSF Scorecard.