CVE-2021-31154 Permissions bypass in pleaser

High 7.8 Published Updated

A local attacker can gain root privileges by exploiting predictable temporary filenames in the pleaseedit library via a symlink attack.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2021-31154?

CVE-2021-31154 is a high-severity path traversal vulnerability in n/a, published on 27 May 2021. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

pleaseedit in please before 0.4 uses predictable temporary filenames in /tmp and the target directory. This allows a local attacker to gain full root privileges by staging a symlink attack.

Weakness: CWE-668

Which versions are affected by CVE-2021-31154?

3 open source packages ship an affected version, including pleaser. It affects 1 product.

PackageAffectedFixed in
pleaser crates.ioAll versions0.4.0
pleaser crates.ioAll versions0.4.0
pleaser crates.ioFrom 0.0.0-00.4.0

Products include Pleaseedit Project Pleaseedit.

How do I fix CVE-2021-31154?

Upgrade pleaser to 0.4.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-31154 being exploited?

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

Sources

Also known as DEBIAN-CVE-2021-31154, GHSA-pp74-39w2-v4w9, RUSTSEC-2021-0102.

Is CVE-2021-31154 in your software?

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

Check your SBOMs for free