medium severity
npm

Arbitrary Command Injection

Affected package Vulnerable versions Latest version Snyk patch
dns-sync <0.1.1 0.1.3 Not available

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

Snyk patch

Not available.