CVE-2021-31155
Rust vulnerability analysis and mitigation

Overview

The CVE-2021-31155 vulnerability affects the 'please' utility, a sudo-like program written in Rust, versions before 0.4. This vulnerability was discovered during a code review for inclusion of the setuid-root binary in openSUSE and was disclosed on May 18, 2021. The vulnerability stems from a failure to normalize the umask in the please utility (Openwall List).

Technical details

The vulnerability occurs due to the token directory '/var/run/pleaser/token' being created with unsanitized umask. When the directory is created via Rust's create_dir_all function, the process's umask is not properly sanitized, allowing unprivileged users to influence the resulting directory permissions. The vulnerability has been assigned a CVSS v3.1 base score of 7.8 (HIGH) with the vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

The vulnerability allows any user who is permitted to execute at least one command with password authentication to perform a full local root exploit. This can lead to complete system compromise as attackers can gain full root privileges on the affected system (Openwall List).

Exploitability

The vulnerability is exploitable by local users who have permission to execute at least one command through the 'please' utility. The exploitation process involves manipulating the umask to create world-writable directories and subsequently leveraging these permissions to escalate privileges (Openwall List).

Mitigation and workarounds

The vulnerability was fixed in please version 0.4.0. System administrators should upgrade to this version or later to address the security issue. The fix includes proper sanitization of the umask when creating the token directory (Openwall List).

Additional resources


SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-5x78-73v4-xg6wHIGH8.7
  • Rust logoRust
  • postgres-protocol
NoYesAug 24, 2026
GHSA-fx4f-mhw4-qm7jMEDIUM6.9
  • Rust logoRust
  • vibeio-http
NoYesAug 24, 2026
GHSA-3gjw-f78c-vvpwMEDIUM6.9
  • Rust logoRust
  • tokio-postgres
NoYesAug 24, 2026
GHSA-rgqc-3x5p-6gwgMEDIUM6.9
  • Rust logoRust
  • postgres-protocol
NoYesAug 24, 2026
RUSTSEC-2026-0267NONEN/A
  • Rust logoRust
  • stable-vec
NoYesAug 24, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management