Arbitrary Command Injection

Affecting dns-sync package, versions <0.1.3

Do your applications use this vulnerable package? Test your applications

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.3 were vulnerable to arbitrary command execution via maliciously formed hostnames.

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

CVSS Score

6.5
medium severity
  • Attack Vector
    Network
  • Attack Complexity
    Low
  • Privileges Required
    None
  • User Interaction
    None
  • Scope
    Unchanged
  • Confidentiality
    Low
  • Integrity
    Low
  • Availability
    None
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Credit
Steve Kemp
CVE
CVE-2014-9682
CWE
CWE-77
Snyk ID
npm:dns-sync:20141111
Disclosed
11 Nov, 2014
Published
11 Nov, 2014