CVE-2019-13173 Arbitrary File Overwrite in fstream

High 7.5 Published Updated

An attacker can overwrite arbitrary system files by crafting a tarball with hardlinks, affecting applications using the fstream library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2019-13173?

CVE-2019-13173 is a high-severity path traversal vulnerability in n/a, published on 2 Jul 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

fstream before 1.0.12 is vulnerable to Arbitrary File Overwrite. Extracting tarballs containing a hardlink to a file that already exists in the system, and a file that matches the hardlink, will overwrite the system's file with the contents of the extracted file. The fstream.DirWriter() function is vulnerable.

Weakness: CWE-59

Which versions are affected by CVE-2019-13173?

2 open source packages ship an affected version, including fstream. It affects 1 product.

PackageAffectedFixed in
fstream npmAll versions1.0.12
fstream npmAll versions1.0.12
Linux distribution packages (15)
nodejs4 SUSE:Enterprise Storage 4All versions4.9.1-15.23.1
nodejs6 SUSE:Enterprise Storage 4All versions6.17.0-11.27.1
nodejs10 SUSE:Linux Enterprise Module for Web and Scripting 12All versions10.16.0-1.9.1
nodejs4 SUSE:Linux Enterprise Module for Web and Scripting 12All versions4.9.1-15.23.1
nodejs6 SUSE:Linux Enterprise Module for Web and Scripting 12All versions6.17.0-11.27.1
nodejs10 SUSE:Linux Enterprise Module for Web and Scripting 15All versions10.16.0-1.9.1
nodejs8 SUSE:Linux Enterprise Module for Web and Scripting 15All versions8.15.1-3.17.1
nodejs10 SUSE:Linux Enterprise Module for Web and Scripting 15 SP1All versions10.16.0-1.9.1
nodejs8 SUSE:Linux Enterprise Module for Web and Scripting 15 SP1All versions8.15.1-3.17.1
nodejs6 SUSE:OpenStack Cloud 7All versions6.17.0-11.27.1
nodejs6 SUSE:OpenStack Cloud Crowbar 8All versions6.17.0-11.27.1
nodejs6 SUSE:OpenStack Cloud Crowbar 9All versions6.17.0-11.27.1
nodejs8 openSUSE:Leap 15.0All versions8.15.1-lp151.2.3.1
nodejs10 openSUSE:Leap 15.1All versions10.16.0-lp151.2.3.1
nodejs8 openSUSE:Leap 15.1All versions8.15.1-lp151.2.3.1

Products include Fstream Project Fstream.

How do I fix CVE-2019-13173?

Upgrade fstream to 1.0.12 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2019-13173 being exploited?

There is no known exploitation of CVE-2019-13173 in the wild and no public exploit code.

Sources

Also known as CLSA-2026-1773188137, DEBIAN-CVE-2019-13173, GHSA-xf7w-r453-m56c, OESA-2022-1584, OESA-2022-2084, SUSE-SU-2019:2055-1 and 9 more.

Is CVE-2019-13173 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free