Quick answers
- Is CVE-2018-20835 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2018-20835 being exploited in the wild.
- How severe is CVE-2018-20835?
- Low severity, with a CVSS score of 3, published 1 May 2019.
- Which products and versions are affected?
- tar-fs (npm) SEMVER:introduced=0,fixed=1.16.2.
- Is there a fix for CVE-2018-20835?
- Yes. tar-fs (npm): upgrade to 1.16.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2018-20835 attacked?
- It is attacked over the network.
- Am I affected by CVE-2018-20835?
- Check whether you run tar-fs (npm) at an affected version. 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.
How to fix
- tar-fs (npm): upgrade to 1.16.2 or later
npm install tar-fs@1.16.2
Technical details
The vulnerability is an improper input validation issue (CWE-20) in tar-fs before version 1.16.2 affecting hardlink extraction. When extracting a tarball containing a hardlink to an existing file followed by a plain file with the same name, the library fails to properly validate that the hardlink target is within the extraction directory, allowing the hardlink to reference files outside the intended extraction path. An attacker can exploit this by crafting a specially constructed tarball and providing it to an application that uses tar-fs to extract archives. The fix, implemented in commit 06672828, restricts hardlink targets to be within the tar archive's contents by using path normalization.
Affected products
- tar-fs tar-fs before 1.16.2
Identifiers
- CVE-2018-20835
- GHSA-x2mc-8fgj-3wmr
Timeline
- 2019-04-30: disclosed
- 2019-05-01: advisory
- 2019: patched: Fixed in version 1.16.2