setcap on Node.js prevents processing of NODE_OPTIONS
Open
Nobody has claimed this yet.
linux
security
- Dominant language
- JavaScript
- Stars
- 122k
- Forks
- 37.3k
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 283
Description
- Version: v15.11.0
- Platform: Linux connor-Virtual-Machine 5.4.0-66-generic
- Subsystem: unknown
What steps will reproduce the bug?
sudo setcap cap_net_admin+iep $(which node)- Attempt to use anything in the NODE_OPTIONS environment variable
- Nothing happens
How often does it reproduce? Is there a required condition?
100% of the time
What is the expected behavior?
I would expect NODE_OPTIONS to be processed regardless.
What do you see instead?

Additional information
Reported on https://github.com/microsoft/vscode-js-debug/issues/852
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Linux command sudo setcap cap_net_admin+iep $(which node) with a NODE_OPTIONS value, then trace Node.js startup handling for environment options when capabilities are set. Done means NODE_OPTIONS is processed under this condition, with coverage for the reported v15.11.0 behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, linux, node.js
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100