Fix cross-spawn vulnerability (CVE-2024-21538) by removing child-process-promise#8177
Merged
thatmichael85 merged 1 commit intomainfrom Feb 26, 2026
Merged
Conversation
…ess-promise Replace unmaintained child-process-promise@2.2.1 (which depends on vulnerable cross-spawn@4.0.2) with a lightweight shared utility using Node's built-in child_process module. This eliminates CVE-2024-21538 (ReDoS, HIGH severity) without requiring pnpm overrides.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
etrepum
approved these changes
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
child-process-promise@2.2.1(unmaintained since 2017) and its transitive dependencycross-spawn@4.0.2, which has CVE-2024-21538 (ReDoS, HIGH severity)scripts/shared/childProcess.js, a lightweight wrapper around Node's built-inchild_processmodule:exec=util.promisify(child_process.exec)— drop-in replacement, returns{stdout, stderr}spawn= thin Promise wrapper that resolves on exit code 0 and rejects with{code}on failurepackage.json:child-process-promiseand@types/child-process-promisescripts/__tests__/unit/childProcess.test.ts) covering exec/spawn success, failure, option forwarding, and graceful handling of the removedcaptureoptionFiles changed
scripts/shared/childProcess.jsscripts/__tests__/unit/childProcess.test.tsscripts/build.jsscripts/override-react.jsscripts/npm/release.jsscripts/npm/update-changelog.jsscripts/npm/increment-version.jsscripts/npm/postversion.jsscripts/update-examples.mjsscripts/__tests__/integration/setup.jsscripts/__tests__/integration/utils.jscaptureoptionpackage.jsonpnpm-lock.yamlTest plan
pnpm run test-unit) — 96 test files, 0 failureschildProcess.test.tspasses (8/8 tests)child-process-promiseandcross-spawn@4.0.2are absent frompnpm-lock.yamlDemo
[
cursorful-video-1772076047703.mp4
](url)