Executive brief
dns-sync is a Node.js library for performing DNS lookups. A command injection vulnerability in hostname validation allows an attacker to execute arbitrary shell commands if the library is used with untrusted input. This could lead to complete compromise of systems using the affected library.
Technical details
dns-sync contains a command injection vulnerability in hostname parameter handling due to insufficient input validation. The vulnerability exists in the dns-sync.js library where hostnames are processed without proper escaping, allowing an attacker to inject shell metacharacters and execute arbitrary commands. The attack vector is network-accessible if the library is used to process hostnames from untrusted sources (e.g., user input, external APIs). The vulnerability was patched in version 0.1.3 by adding validation checks for hostname input, as evidenced by the commit adding hostname validation. This advisory was later withdrawn as a duplicate of GHSA-jcw8-r9xm-32c6.
Affected products
- npm dns-sync before 0.1.3
Timeline
- 2020-08-27: advisory