GitHub Advisoryadvisory · npm
GHSA-38h8-x697-gh8q Tmp files readable by other users in sync-exec
MEDIUM
Official page ↗
- Aliases
- CVE-2017-16024
- Ecosystem
- npm
- Packages
- sync-exec
- Severity
- Moderate
- CVSS vector
- CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- Weaknesses
- CWE-377
- Reviewed
- 2020-06-16
Affected packages
• npm sync-exec: <= 0.6.2 (no fix yet)
Description
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.
Recommendation
There 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.
The 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()`.
Related
Weakness · not in database (1)
Alias · CVE (1)
- CVE-2017-16024 The sync-exec module is used to simulate child_process.execSync in node versions <0.11.9. vulnerability
References
- https://nvd.nist.gov/vuln/detail/CVE-2017-16024 advisory
- https://github.com/gvarsanyi/sync-exec/issues/17 web
- https://cwe.mitre.org/data/definitions/377.html web
- https://github.com/advisories/GHSA-38h8-x697-gh8q advisory
- https://www.npmjs.com/advisories/310 web
- https://www.owasp.org/index.php/Insecure_Temporary_File web