CVE-2026-145489: tar-fs before 2.1.6 and 3.x before 3.1.4 Symlink Validation Bypass via Nested Symlinks
tar-fs before 2.1.6 and 3.x before 3.1.4 contains a path traversal vulnerability that allows attackers to escape the extraction directory by chaining symlinks with '..' segments. Attackers can supply a crafted tarball where later entries traverse through earlier symlinks, creating links outside the destination to write or read files.
Affected Software
Event History
Frequently Asked Questions
Which deployments are affected?
Deployments using npm/tar-fs versions earlier than 2.1.6, or 3.x versions earlier than 3.1.4, are affected when they extract attacker-controlled tar archives.
What does an attacker need to exploit this issue?
An attacker needs to convince the application to extract a crafted tarball. The attack uses earlier archive entries to create symlinks and later entries containing '..' segments to traverse through those symlinks.
What is the impact of successful exploitation?
A crafted archive can escape the intended extraction directory and create links outside that destination. This can enable writes to or reads from files outside the extraction directory.
What should be done if an update cannot be applied immediately?
Do not extract untrusted tarballs with affected versions. Restrict archive sources until upgrading to tar-fs 2.1.6 or later in the 2.x line, or 3.1.4 or later in the 3.x line.