CVE-2017-16100: Dns sync Command Injection Vulnerability
CRITICALCVE-2017-16100 is a CRITICAL command injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Dns sync libraries in the npm ecosystem. The issue involves command injection in dns-sync. Remediation is available by upgrading affected packages to version 0.1.1.
CVE-2017-16100 at a Glance
How to Fix CVE-2017-16100
To remediate this vulnerability, upgrade all affected Dns sync dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install dns-sync@0.1.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls dns-sync
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2017-16100, inspect your project dependencies using npm:
npm ls dns-sync
Analyze the terminal output to locate any version of Dns sync in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.1), your application is affected.
Note: The npm ls dns-sync command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Dns sync, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2017-16100 Affected Dns sync Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
dns-sync
|
npm |
< 0.1.1
|
0.1.1
|
References
Frequently Asked Questions
What is CVE-2017-16100?
Which Dns sync versions are affected?
What version fixes CVE-2017-16100?
Is dns-sync affected?
What CWE is associated with CVE-2017-16100?
How can I check npm dependencies for CVE-2017-16100?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jcw8-r9xm-32c6",
"modified" : "2020-08-31T18:26:20Z",
"published" : "2018-07-18T18:28:02Z",
"aliases" : [ "CVE-2017-16100" ],
"summary" : "Command Injection in dns-sync",
"details" : "Affected versions of `dns-sync` have an arbitrary command execution vulnerability in the `resolve()` method. \n\n\n\n## Recommendation\n\n- Use an alternative dns resolver\n- Do not allow untrusted input into `dns-sync.resolve()`",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "dns-sync"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-16100"
}, {
"type" : "WEB",
"url" : "https://github.com/skoranga/node-dns-sync/issues/1"
}, {
"type" : "WEB",
"url" : "https://github.com/skoranga/node-dns-sync/issues/1)"
}, {
"type" : "WEB",
"url" : "https://github.com/skoranga/node-dns-sync/issues/5"
}, {
"type" : "WEB",
"url" : "https://github.com/skoranga/node-dns-sync/commit/d9abaae384b198db1095735ad9c1c73d7b890a0d"
}, {
"type" : "WEB",
"url" : "https://github.com/skoranga/node-dns-sync/commit/d9abaae384b198db1095735ad9c1c73d7b890a0d)))"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-jcw8-r9xm-32c6"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/153"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/523"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:43:08Z",
"nvd_published_at" : null
}
}