CVE-2017-16024: Sync exec Tmp Files Readable By Other Vulnerability
MODERATECVE-2017-16024 is a MODERATE (CVSS 6.5) tmp files readable by other vulnerability (CWE-377: Insecure Temporary File) affecting Sync exec libraries in the npm ecosystem. The issue involves tmp files readable by other users in sync-exec. Remediation is available in the latest vendor maintenance releases.
CVE-2017-16024 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2017-16024
To remediate this vulnerability, upgrade all affected Sync exec 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 sync-exec@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls sync-exec
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2017-16024, inspect your project dependencies using npm:
npm ls sync-exec
Analyze the terminal output to locate any version of Sync exec in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls sync-exec 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-377: Insecure Temporary File, where creating and using insecure temporary files can leave application and system data vulnerable to attack. In Sync exec, 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-16024 Affected Sync exec Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sync-exec
|
npm |
≤ 0.6.2
|
|
References
Frequently Asked Questions
What is CVE-2017-16024?
Which Sync exec versions are affected?
What version fixes CVE-2017-16024?
Is sync-exec affected?
What is the CVSS score of CVE-2017-16024?
What CWE is associated with CVE-2017-16024?
How can I check npm dependencies for CVE-2017-16024?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-38h8-x697-gh8q",
"modified" : "2023-09-07T20:13:49Z",
"published" : "2018-11-09T17:45:30Z",
"aliases" : [ "CVE-2017-16024" ],
"summary" : "Tmp files readable by other users in sync-exec",
"details" : "Affected versions of `sync-exec` use files located in `/tmp/` to buffer command results before returning values. As `/tmp/` is almost always set with world readable permissions, this may allow low privilege users on the system to read the results of commands run via `sync-exec` under a higher privilege user.\n\n\n## Recommendation\n\nThere is currently no direct patch for `sync-exec`, as the `child_process.execSync` function provided in Node.js v0.12.0 and later provides the same functionality natively. \n\nThe best mitigation currently is to update to Node.js v0.12.0 or later, and migrate all uses of `sync-exec` to `child_process.execSync()`.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "sync-exec"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.6.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-16024"
}, {
"type" : "WEB",
"url" : "https://github.com/gvarsanyi/sync-exec/issues/17"
}, {
"type" : "WEB",
"url" : "https://cwe.mitre.org/data/definitions/377.html"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-38h8-x697-gh8q"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/310"
}, {
"type" : "WEB",
"url" : "https://www.owasp.org/index.php/Insecure_Temporary_File"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-377" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T20:54:36Z",
"nvd_published_at" : null
}
}