Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Low severity, with a CVSS score of 3, published 24 May 2022.
- Which products and versions are affected?
- node-js-libs cli >= 0.1.0, < 1.0.0.
- Is there a fix for This vulnerability?
- No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
- How is This vulnerability attacked?
- It is attacked over the network, in a software library.
- Am I affected?
- Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
The node-cli library (versions 0.1.0 through 0.11.3) creates temporary lock and log files in the /tmp directory using predictable names based on the application name (e.g., /tmp/[app].pid). Because these files are created in a world-writable directory without sufficient validation, an attacker can create a symbolic link at the expected file path. When the application runs, it follows the link and overwrites the target file with the privileges of the user executing the CLI tool. This is classified as a path traversal/race condition issue (CWE-22, CWE-362). The vulnerability is fixed in version 1.0.0.
Affected products
- node-js-libs cli >= 0.1.0, < 1.0.0
Timeline
- 2016-03-28: disclosed: Initial report by Steve Kemp
- 2016-06-15: advisory: NPM advisory published
- 2016-06-16: other: GitHub issue #81 opened to track the flaw
- 2022-05-24: advisory: GitHub Advisory published
- 2023-12-08: other: Advisory GHSA-3mrp-qhcj-mwv5 withdrawn as a duplicate of GHSA-6cpc-mj5c-m9rq