Skip to content

Conversation

@CampbellReid
Copy link
Contributor

The issue lies here: https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2#command-injection-via-args-parameter-of-child_processspawn-without-shell-option-enabled-on-windows-cve-2024-27980---high

cve-2024-27980 requires any time a .bat or .cmd is run using the spawn or spawnSync commands it now needs to pass in a configuration of { shell: true }.

This prevented the npm install command from running on a Windows machine.

After applying the change, npm install runs to completion. I have also tested against the node.js package-lock.json version 20.11.1 and the addition of the configuration makes no noticeable difference.

@CLAassistant
Copy link

CLAassistant commented Sep 17, 2024

CLA assistant check
All committers have signed the CLA.

@CampbellReid CampbellReid changed the title Added configuration to fix breaking change for latest node versions cve-2024-27980 Added configuration to fix breaking change for latest node versions on windows cve-2024-27980 Sep 18, 2024
@CampbellReid
Copy link
Contributor Author

In addition, the documentation shows the addition of checking if it needs a shell makes no difference to the linux behaviour as it is assumed false by default. Since we are checking if the platform equals windows then it will be false on linux anyway: https://nodejs.org/api/child_process.html#child_processspawncommand-args-options

@pimterry pimterry force-pushed the npminstallfailurewindows branch from 2488ad4 to 33c85ce Compare September 25, 2024 11:32
@pimterry pimterry merged commit b0381b0 into httptoolkit:main Sep 25, 2024
13 checks passed
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.

3 participants