CVE-2021-41149 Improper sanitization of target names in tough

High 8.2 Published Updated

Attackers can overwrite arbitrary files on the system by exploiting improper sanitization of target names in the tough library.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-41149?

CVE-2021-41149 is a high-severity path traversal vulnerability in awslabs tough, published on 19 Oct 2021. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Tough provides a set of Rust libraries and tools for using and generating the update framework (TUF) repositories. The tough library, prior to 0.12.0, does not properly sanitize target names when caching a repository, or when saving specific targets to an output directory. When targets are cached or saved, files could be overwritten with arbitrary content anywhere on the system. A fix is available in version 0.12.0. No workarounds to this issue are known.

Weakness: CWE-22

Which versions are affected by CVE-2021-41149?

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

PackageAffectedFixed in
tough crates.ioAll versions0.12.0
tough crates.ioAll versions0.12.0

Products include Amazon Tough.

How do I fix CVE-2021-41149?

Upgrade tough to 0.12.0 or later.

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

Is CVE-2021-41149 being exploited?

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

Sources

Also known as GHSA-x3r5-q6mj-m485.

Is CVE-2021-41149 in your software?

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

Check your SBOMs for free