GHSL-2020-119: command injection vulnerability in node-dns-sync resolve method - CVE-2020-11079
The resolve method of the node-dns-sync library did not sanitise user input, allowing an attacker to inject arbitrary shell commands. If a client passed untrusted input to this method, an attacker could execute commands on the system.
Originally disclosed on GitHub Security Lab
The resolve method of the node-dns-sync library had a command injection vulnerability. Clients of the node-dns-sync library are unlikely to be aware of this, so they might unwittingly write code that contains a command injection vulnerability.
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
Root cause
The library passed user-supplied input directly to a shell command without proper sanitisation.
Impact
This could lead to remote code execution if a client of the library calls the vulnerable method with untrusted input.
What the attacker needed
Client passes untrusted input to resolve
The fix
The issue was fixed in version 0.2.1.
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.
This library helps look up DNS records. It took the hostname you gave it and put it directly into a system command without cleaning it. So if you passed a hostname containing extra shell commands, those commands would run on your computer.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.