---
title: "GHSA-x2mc-8fgj-3wmr: Improper Input Validation in tar-fs"
description: "High severity. Improper Input Validation in tar-fs. Affects tar-fs; fixed in 1.16.2."
url: https://inlinr.com/advisories/GHSA-x2mc-8fgj-3wmr
lang: en
---

[Packages](https://inlinr.com/packages) / [tar-fs](https://inlinr.com/packages/tar-fs) / [Security](https://inlinr.com/packages/tar-fs/security)

High Vulnerability GHSA-x2mc-8fgj-3wmr CVE-2018-20835 Published 1 May 2019

# Improper Input Validation in tar-fs

Your version 

Affected releases · [tar-fs](https://inlinr.com/packages/tar-fs)

- 1.x 1.0.0 – 1.16.1 Fixed in 1.16.2
- 0.5.x and older 0.1.0 – 0.5.2 No fix, no longer updated

On 1.x, the newest line:

```
npm install tar-fs@1.16.2
```

Every release on a timeline

3.x 

1. Not affected

3.0.0 – 3.1.3  
15 releases, latest

1.x 

1. Affected

1.0.0 – 1.16.1  
28 releases
2. Fixed

1.16.2 – 1.16.6  
5 releases

0.x 

1. Affected

0.1.0 – 0.5.2  
21 releases

77 stable releases of tar-fs, oldest to newest, one row per major.

## What happens

A vulnerability was found in tar-fs before 1.16.2\. An Arbitrary File Overwrite issue exists when extracting a tarball containing a hardlink to a file that already exists on the system, in conjunction with a later plain file with the same name as the hardlink. This plain file content replaces the existing file content.

## How it is exploited

Exploitable over the network, with no account and no action from a user.

- **Confidentiality**: none
- **Integrity**: high
- **Availability**: none

CVSS:3.0/​AV:N/​AC:L/​PR:N/​UI:N/​S:U/​C:N/​I:H/​A:N

## References

- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2018-20835 "https://nvd.nist.gov/vuln/detail/CVE-2018-20835")  
nvd.nist.gov/vuln/detail/CVE-2018-20835
- [Fix commit](https://github.com/mafintosh/tar-fs/commit/06672828e6fa29ac8551b1b6f36c852a9a3c58a2 "https://github.com/mafintosh/tar-fs/commit/06672828e6fa29ac8551b1b6f36c852a9a3c58a2")  
0667282
- [Reference](https://hackerone.com/reports/344595 "https://hackerone.com/reports/344595")  
hackerone.com/reports/344595
- [Reference](https://github.com/mafintosh/tar-fs/compare/d590fc7...a35ce2f "https://github.com/mafintosh/tar-fs/compare/d590fc7...a35ce2f")  
d590fc7...a35ce2f

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
