CVE-2021-3156 in sudo Can Let Local Users Escalate to Root

· Original article ↗

Summary

CVE-2021-3156 affects specified sudo versions and can allow a local user to gain root privileges without authentication. The article identifies affected and patched versions and provides a command to check for vulnerability.

Key points

  • The article describes CVE-2021-3156 as a high-severity sudo vulnerability that can let an unauthenticated local user escalate privileges to root.
  • Affected releases are legacy versions 1.8.2 through 1.8.31p2 and stable versions 1.9.0 through 1.9.5p1, in their default configuration.
  • Versions before 1.8.2 are listed as unaffected; version 1.9.5p2 is identified as patched.
  • The described flaw involves sudo's handling of escaped command arguments in shell mode, combined with sudoedit parsing that can set the shell-mode flag without running a command.
  • The article estimates that 90% of cloud workloads run Linux-based operating systems and warns that many Linux cloud assets may be at risk.
  • It suggests testing as a non-root user with `sudoedit -s /`; an error beginning `sudoedit:` indicates a vulnerable system, while `usage:` indicates a patched system.

Article Details

Vulnerability Types
  • Privilege escalation
  • Out-of-bounds read
Severity
High
Affected Versions
  • sudo 1.8.2 to 1.8.31p2 (legacy versions)
  • sudo 1.9.0 to 1.9.5p1 (stable versions)
Exploitation Status
unknown
Exploit Availability
unknown
Patch Status
available

MITRE ATT&CK

CVE

Vendors

Products

Related Articles