---
title: "GHSA-8cj5-5rvv-wf4v: tar-fs can extract outside the specified dir with a specific tarball"
description: "High severity. tar-fs can extract outside the specified dir with a specific tarball. Affects tar-fs; fixed in 3.0.9."
url: https://inlinr.com/advisories/GHSA-8cj5-5rvv-wf4v
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-8cj5-5rvv-wf4v CVE-2025-48387 Published 3 Jun 2025

# tar-fs can extract outside the specified dir with a specific tarball

Your version 

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

- 3.x 3.0.0 – 3.0.8 Fixed in 3.0.9
- 2.x 2.0.0 – 2.1.2 Fixed in 2.1.3
- 1.x 1.0.0 – 1.16.4 Fixed in 1.16.5
- 0.5.x and older 0.1.0 – 0.5.2 No fix, no longer updated

On 3.x, the newest line:

```
npm install tar-fs@3.0.9
```

Every release on a timeline

3.x 

1. Affected

3.0.0 – 3.0.8  
9 releases
2. Fixed

3.0.9 – 3.1.3  
6 releases, latest

2.x 

1. Affected

2.0.0 – 2.1.2  
5 releases
2. Fixed

2.1.3 – 2.1.5  
3 releases

1.x 

1. Affected

1.0.0 – 1.16.4  
31 releases
2. Fixed

1.16.5 – 1.16.6  
2 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

Impact

 v3.0.8, v2.1.2, v1.16.4 and below

Patches

Has been patched in 3.0.9, 2.1.3, and 1.16.5

Workarounds

You can use the ignore option to ignore non files/directories.

```
  ignore (_, header) {
    // pass files & directories, ignore e.g. symlinks
    return header.type !== 'file' && header.type !== 'directory'
  }
```

Credit

Thank you Caleb Brown from Google Open Source Security Team for reporting this in detail.

## How it is exploited

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

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

CVSS:4.0/​AV:N/​AC:L/​AT:N/​PR:N/​UI:N/​VC:N/​VI:H/​VA:N/​SC:N/​SI:N/​SA:N

## References

- [Reference](https://github.com/google/security-research/security/advisories/GHSA-xrg4-qp5w-2c3w "https://github.com/google/security-research/security/advisories/GHSA-xrg4-qp5w-2c3w")  
github.com/google/security-research/security/ad…
- [Reference](https://github.com/mafintosh/tar-fs/security/advisories/GHSA-8cj5-5rvv-wf4v "https://github.com/mafintosh/tar-fs/security/advisories/GHSA-8cj5-5rvv-wf4v")  
github.com/mafintosh/tar-fs/security/advisories…
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2025-48387 "https://nvd.nist.gov/vuln/detail/CVE-2025-48387")  
nvd.nist.gov/vuln/detail/CVE-2025-48387
- [Fix commit](https://github.com/mafintosh/tar-fs/commit/647447b572bc135c41035e82ca7b894f02b17f0f "https://github.com/mafintosh/tar-fs/commit/647447b572bc135c41035e82ca7b894f02b17f0f")  
647447b
- [Package](https://github.com/mafintosh/tar-fs "https://github.com/mafintosh/tar-fs")  
github.com/mafintosh/tar-fs
- [Reference](https://lists.debian.org/debian-lts-announce/2025/06/msg00012.html "https://lists.debian.org/debian-lts-announce/2025/06/msg00012.html")  
lists.debian.org/debian-lts-announce/2025/06/ms…

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.
