You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you introduce a argument we could pass in that would allow us to mitigate this by giving us an "unsafe" option we could enable that would allow us to run batch files by adding the { shell: true } argument to any spawn calls?
NOTE that the command works when passing in --interpreter cmd but it doesn't seem to run the contents of the batch file and leaves the cmd shell open without doing anything:
C:\Users\me\.pm2\logs\mybatch-out.log last 15 lines:
10|StreamL | Microsoft Windows [Version 10.0.19045.4894]
10|StreamL | (c) Microsoft Corporation. All rights reserved.
10|StreamL |
10|StreamL | \dir>Microsoft Windows [Version 10.0.19045.4894]
10|StreamL | (c) Microsoft Corporation. All rights reserved.
10|StreamL |
10|StreamL | \dir>Microsoft Windows [Version 10.0.19045.4894]
10|StreamL | (c) Microsoft Corporation. All rights reserved.
10|StreamL |
I've tried it multiple times and it doesn't output anything nor does it do anything
What's going wrong?
After April 10th 2024, the Node team released a patch to an exploit "Command injection via args parameter of child_process.spawn without shell option enabled on Windows (CVE-2024-27980) - (HIGH)". As a result, we are unable to create a pm2 task that would run a
.bat
batch file and there's an error thrown,Error while launching application Error: spawn EINVAL
(nodejs/node#52554).Could you introduce a argument we could pass in that would allow us to mitigate this by giving us an "unsafe" option we could enable that would allow us to run batch files by adding the
{ shell: true }
argument to any spawn calls?NOTE that the command works when passing in
--interpreter cmd
but it doesn't seem to run the contents of the batch file and leaves the cmd shell open without doing anything:I've tried it multiple times and it doesn't output anything nor does it do anything
How could we reproduce this issue?
ECHO Hello World
pm2 start "mybatch.bat --interpreter none
--name mybatchSupporting information
https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2
nodejs/node#52554
The text was updated successfully, but these errors were encountered: