Node.js on Windows lets any user gain LPE by planting modules in C:\node_modules
Any Windows Node.js application with missing or optional dependencies can be locally escalated to higher privileges by placing a malicious module in C:\node_modules.
Security & privacy Zero Day Initiative Blog 8 Apr 2026 Disclosure Real-world evidence
Published as “Node.js Trust Falls: Dangerous Module Resolution on Windows”
Why it matters
The intentional Node.js design creates a systemic local privilege escalation risk for many Windows desktop applications, yet vendors treat it as out-of-scope.
Summary
The authors show that Node.js on Windows searches for modules all the way up to C:\node_modules, a directory writable by low-privileged users. When an application has a missing or optional dependency, an attacker can drop a malicious file there and have it executed with the application's privileges. They demonstrate this with two real-world cases: npm CLI loading a malicious bluebird.js and Discord loading a malicious utf-8-validate.js, both leading to local privilege escalation. Evidence consists of Procmon logs, screenshots, and a video of calc.exe launching from Discord, but no large-scale telemetry is provided.
What they found 1
- Low-privileged Windows users can create C:\node_modules and plant malicious modules that Node.js will load and execute.
“Since low-privileged Windows users can create this directory and plant malicious modules there, any Node.js application with missing or optional dependencies becomes vulnerable to privilege escalation.”
Caveats 4
- Node.js maintainers state "Node.js trusts the file system." and do not treat CWE-427 as a vulnerability.
- npm and Discord explicitly say they do not consider local attacks a valid security issue.
- The issue only applies on Windows where any user can create C:\node_modules.
- Exploitation requires a missing or optional dependency in the target application.
What’s new here 4
- Identifies a design-level LPE vector in Node.js module resolution on Windows.
- Provides two concrete 0-day case studies (npm CLI and Discord) showing successful exploitation.
- Highlights that major vendors (Node.js, npm, Discord) consider the issue out of scope.
- Calls attention to the broader impact on Electron-based and other Node.js desktop apps.