Repository navigation
Fix cross-spawn vulnerability (CVE-2024-21538) by removing child-process-promise - #8177
Merged
thatmichael85 merged 1 commit intoFeb 26, 2026
Merged
Conversation
…ess-promise Replace unmaintained [email protected] (which depends on vulnerable [email protected]) 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.
thatmichael85
requested review from
acywatson,
etrepum,
fantactuka,
ivailop7,
potatowagon,
takuyakanbr and
zurfyx
as code owners
February 26, 2026 03:16
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
thatmichael85
enabled auto-merge
February 26, 2026 03:22
etrepum
approved these changes
Feb 26, 2026
Merged
This branch was successfully deployed
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
[email protected](unmaintained since 2017) and its transitive dependency[email protected], 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-promiseand[email protected]are absent frompnpm-lock.yamlDemo
[
cursorful-video-1772076047703.mp4
](url)