CVE-2021-41150 Improper sanitization of delegated role names in tough

High 8.2 Published Updated

Attackers can overwrite arbitrary JSON files on the system by exploiting improper sanitization of delegated role 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-41150?

CVE-2021-41150 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 delegated role names when caching a repository, or when loading a repository from the filesystem. When the repository is cached or loaded, files ending with the .json extension could be overwritten with role metadata 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-41150?

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-41150?

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-41150 being exploited?

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

Sources

Also known as GHSA-r56q-vv3c-6g9c.

Is CVE-2021-41150 in your software?

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

Check your SBOMs for free