Skip to content
RCE Advisory Intermediate

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.

ghsecuritylab Follow

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.

ghsecuritylab, on GitHub Security Lab

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

  1. Install node-notifier using npm.
  2. Run a Node.js script that creates a Notify instance with suppressOsdCheck set to true.
  3. Pass an options object with a malicious app-name field containing a command injection payload.
  4. Call the notify method with those options.
  5. 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.

More by ghsecuritylab

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.