Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. theshit
  4. ›
  5. CVE-2026-21882

CVE-2026-21882: theshit's Improper Privilege Dropping Allows Local Privilege Escalation via Command Re-execution

March 2, 2026

Vulnerability Type: Local Privilege Escalation (LPE) / Improper Privilege Management / Arbitrary Command Execution.

The application automatically re-executes the previously failed command but does not properly drop elevated privileges during this process.

When the tool is executed with sudo or otherwise runs with an effective UID of root, it records the last executed command and attempts to rerun it. However, the application fails to restore the original unprivileged user context before re-executing the command. As a result, the retried command is executed with root privileges, even if the original command was issued by an unprivileged user.

This allows a local attacker to intentionally trigger a failed command under elevated execution and gain arbitrary command execution as root via the retry mechanism.

Who is impacted: Any system where this tool is executed with elevated privileges is affected. The risk is especially high in environments where the tool is permitted to run via sudo, including configurations with NOPASSWD, as an unprivileged user can escalate privileges to root without additional interaction.

References

  • github.com/AsfhtgkDavid/theshit
  • github.com/AsfhtgkDavid/theshit/commit/5293957b119e55212dce2c6dcbaf1d7eb794602a
  • github.com/AsfhtgkDavid/theshit/security/advisories/GHSA-2j3p-gqw5-g59j
  • github.com/advisories/GHSA-2j3p-gqw5-g59j
  • nvd.nist.gov/vuln/detail/CVE-2026-21882

Code Behaviors & Features

Detect and mitigate CVE-2026-21882 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.2.0

Fixed versions

  • 0.2.0

Solution

Upgrade to version 0.2.0 or above.

Impact 8.4 HIGH

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-250: Execution with Unnecessary Privileges
  • CWE-269: Improper Privilege Management
  • CWE-273: Improper Check for Dropped Privileges

Source file

cargo/theshit/CVE-2026-21882.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 24 Mar 2026 12:18:34 +0000.