Unitech / Unitech/pm2

PM2 fails to start bat files in Windows because of Node.JS security updates

Open
#5,838 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

What's going wrong?

Node.JS has fixed a security vulnerability in Windows which breaks starting bat or cmd files in pm2 (see CVE-2024-27980).

This results in a EINVAL error when trying to start the process.

The fix is to add shell: true to the options here:
https://github.com/Unitech/pm2/blob/5e0eb40a9f62ef576876ff6a4b6a63345cbd6243/lib/God/ForkMode.js#L92

Le me know if you need more info !

Thanks !

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at lib/God/ForkMode.js around line 92 and review the spawn options described in the issue. Reproduce launching a .bat or .cmd process on Windows and verify the EINVAL failure is resolved after the reported option change, while confirming existing process starts remain unaffected.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, operating-systems
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.