Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call purescript with the shell enabled on Windows, as a workaround for CVE-2024-27980 #1308

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

f-f
Copy link
Member

@f-f f-f commented Jan 17, 2025

Following CVE-2024-27980, Node introduced a mitigation, where it forces callers of the ChildProcess.spawn function to call it with shell: true for .cmd files.
This sounds like a very specific set of conditions, but we are affected - see #1219.

We are also quite removed from the place that calls spawn (as we go through execa), but this patch fixes #1219 by passing shell: true (somehow) to command calls on Windows that end with .cmd

@f-f f-f merged commit 8b951f4 into master Jan 17, 2025
5 checks passed
@f-f f-f deleted the fix-windows-spawn-shell branch January 17, 2025 18:01
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.

Spago fails to build on Windows and Node v 21.7
1 participant