Repository navigation
chore(deps): update dependency cross-spawn to v7.1.0 [security] - #977
Open
renovate-bot wants to merge 1 commit into
Open
renovate-bot wants to merge 1 commit into
renovate-bot wants to merge 1 commit into
Conversation
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.
This PR contains the following updates:
7.0.6→7.1.0cross-spawn: Argument injection on Windows via backslashes before a double quote
CVE-2026-137198 / GHSA-m6qr-m48x-3xhh
More information
Details
Impact
On Windows, when
cross-spawnruns a command throughcmd.exe, it quotes each argument and doubles the backslashes that precede a double quote or the end of the argument, so that they aren't taken as escaping the quote.Since
7.0.4,7.0.5and6.0.6, which changed the regular expressions to fix a ReDoS vulnerability (GHSA-3xgq-45jj-v275), backslash runs weren't doubled correctly:7.0.4didn't double them at all, and7.0.5,7.0.6and6.0.6added only one backslash to each run. An argument with two or more backslashes before a double quote, or at its end, had its closing quote escaped, which let it split into extra arguments or swallow the next ones:The caller can't tell: the command still exits successfully and nothing is written to stderr. Even an ordinary directory path such as
C:\some\dir\\makes the caller's following arguments disappear.Applications are affected if they pass untrusted input as arguments to a command that runs through
cmd.exeon Windows, which includes every npm cmd-shim innode_modules/.bin. The impact depends on the program: one that accepts extra arguments may act on the injected ones, e.g. a tool called with--checkreceiving an injected--write, while one that rejects an unexpected argument fails instead. This doesn't allow running other commands. Other platforms aren't affected.Patches
This is fixed in
7.1.0and6.0.7, which escape backslashes with a loop that handles any number of them in linear time.Workarounds
Validate untrusted input so that only a safe subset is allowed.
Credits
MOXY Studio thanks Duong Bui Thai (LinkedIn) for privately reporting this vulnerability, and both @trackoor and @ogffx for independently reporting and fixing it in #188 and #190.
Severity
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
moxystudio/node-cross-spawn (cross-spawn)
v7.1.0Compare Source
Bug Fixes
7.0.6 (2024-11-18)
Bug Fixes
7.0.5 (2024-11-07)
Bug Fixes
7.0.4 (2024-11-07)
Bug Fixes
7.0.3 (2020-05-25)
Bug Fixes
7.0.2 (2020-04-04)
Bug Fixes
7.0.1 (2019-10-07)
Bug Fixes
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.