dns-sync command injection

Severity: info · Published 2020-08-27

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.

Technologies: dns-sync (npm). Vendors: npm.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Informational severity, published 27 August 2020.
Which products and versions are affected?
dns-sync (npm) before 0.1.3.
Is there a fix for This vulnerability?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is This vulnerability attacked?
It is attacked over the network.
Am I affected?
Check whether you run dns-sync (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

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

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.