Arbitrary Command Injection

Affecting dns-sync package, versions <0.1.1

medium severity

Overview

The dns-sync library for node.js allows resolving hostnames in a synchronous fashion. All versions of dns-sync prior to the release 0.1.1 were vulnerable to arbitrary command execution via maliciously formed hostnames.

Source: Node Security Project

Details

For example:

var dnsSync = require('dns-sync');
console.log(dnsSync.resolve('$(id > /tmp/foo)'));

This is caused by the hostname being passed through a shell as part of a command execution.

Remediation

Upgrade dns-sync to version 0.1.1 or greater.

References

Credit
Steve Kemp
CVE
CVE-2014-9682
Snyk ID
npm:dns-sync:20141111
Disclosed
11 Nov, 2014
Published
11 Nov, 2014

Do your applications use this vulnerable package?