GHSL-2020-373: Command injection in node-notifier
The node-notifier library insufficiently sanitised user-controlled input fields, allowing command injection when passed as command-line arguments. An attacker could achieve arbitrary command execution by supplying malicious input to the library.
Originally disclosed on GitHub Security Lab
node-notifier recently addressed a command injection vulnerability in https://github.com/advisories/GHSA-5fw9-fq32-wv5p, however this fix appears to be insufficient and command injection through malicious input is still possible.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
Arbitrary command execution, allowing an attacker to run commands on the victim's system.
What the attacker needed
Victim uses node-notifier with user input; attacker controls input passed to library
How it was found
- Install node-notifier using npm.
- Run a Node.js script that creates a Notify instance with suppressOsdCheck set to true.
- Pass an options object with a malicious app-name field containing a command injection payload.
- Call the notify method with those options.
- Observe that a file named 'exploit' is created in the current working directory.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
node-notifier is a tool that lets programs show desktop notifications. If a program passes untrusted text (like a notification title) into node-notifier, an attacker could include special characters that make the computer run extra commands. This means the attacker could run their own code on the victim's machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.