CVE-2021-31154
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
An insecure temporary file creation vulnerability in pleaseedit before 0.4 allows local attackers to gain root privileges via a symlink attack.
Vulnerability
pleaseedit, a component of the privilege escalation tool pleaser (also known as please) versions before 0.4, uses predictable temporary filenames in /tmp and the target directory. This lack of randomness allows a local attacker to stage a symlink race attack. [1][2][3]
Exploitation
An attacker must have a local user account and be permitted to run a command via please (i.e., be listed in the please.ini configuration). By pre-creating a symbolic link with the predictable temporary filename pointing to a sensitive system file (e.g., /etc/shadow), the attacker can trick the setuid-root pleaseedit process into writing attacker-controlled content to that file, thereby overwriting critical system files. The attack requires precise timing to win the race condition between the temporary file creation and the write operation. [1]
Impact
Successful exploitation allows a local attacker to gain full root privileges. By overwriting files such as /etc/passwd or /etc/shadow, the attacker can escalate to root, leading to complete compromise of system confidentiality, integrity, and availability. [1][2][3]
Mitigation
The vulnerability is fixed in pleaser version 0.4 and later. Users should upgrade to version 0.4 or newer. There are no known workarounds for versions prior to 0.4. This CVE is not listed in CISA's Known Exploited Vulnerabilities catalog. [1][3]
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
pleasercrates.io | < 0.4.0 | 0.4.0 |
Affected products
1Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
6- github.com/advisories/GHSA-pp74-39w2-v4w9ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-31154ghsaADVISORY
- crates.io/crates/pleaserghsaWEB
- gitlab.com/edneville/please/-/tree/master/src/binghsax_refsource_MISCWEB
- rustsec.org/advisories/RUSTSEC-2021-0102.htmlghsaWEB
- www.openwall.com/lists/oss-security/2021/05/18/1ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.