Symlink Following Affecting tar-fs package, versions <1.16.6>=2.0.0 <2.1.4>=3.0.0 <3.1.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Symlink Following vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-TARFS-13045213
  • published25 Sept 2025
  • disclosed24 Sept 2025
  • creditMapta, BugBunny_ai

Introduced: 24 Sep 2025

NewCVE-2025-59343  (opens in a new tab)
CWE-22  (opens in a new tab)
CWE-61  (opens in a new tab)

How to fix?

Upgrade tar-fs to version 1.16.6, 2.1.4, 3.1.1 or higher.

Overview

tar-fs is a filesystem bindings for tar-stream.

Affected versions of this package are vulnerable to Symlink Following via the symlink validation process in the inCwd function. An attacker can write files outside the intended extraction directory by crafting a malicious tarball that contains symlinks starting with the name of the current working directory.

Workaround

This vulnerability can be mitigated by using the ignore option to exclude non-file and non-directory entries during the extraction process.

References

CVSS Base Scores

version 4.0
version 3.1