Arbitrary Command Injection Affecting dns-sync package, versions <0.1.3


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
2.84% (86th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDnpm:dns-sync:20141111
  • published11 Nov 2014
  • disclosed11 Nov 2014
  • creditSteve Kemp

Introduced: 11 Nov 2014

CVE-2014-9682  (opens in a new tab)
CWE-77  (opens in a new tab)

How to fix?

Upgrade dns-sync to version 0.1.1 or greater.

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.

CVSS Base Scores

version 3.1