Sudo Privilege Escalation Vulnerability Discovered

,

Posted on

By

Qualys has discovered and reported a serious vulnerability (CVE-2021-3156) affecting the sudo utility. Patches are now available and Raxis recommends applying them immediately.

Sudo Privilege Escalation Vulnerability Discovered
Summary

Qualys recently discovered a heap-based buffer overflow in the sudo utility, which is in use on almost-all Unix based operating systems.* This vulnerability (CVE-2021-3156) can be exploited by any user, even if they are not in the sudoers file, and has been present since it was introduced in July 2011.

Affected Versions

Any operating system using the following sudo versions are vulnerable:

  • All legacy versions from 1.8.2 to 1.8.31p2
  • All stable versions from 1.9.0 to 1.9.5p1

This includes most major operating systems such as Ubuntu, RHEL, Debian, Fedora, etc. that have these versions of sudo installed. Qualys was able to develop exploits specifically for Ubuntu 20.04 (Sudo 1.8.31), Debian 10 (Sudo 1.8.27), and Fedora 33 (Sudo 1.9.2), but any operating system using the vulnerable versions of sudo should be considered vulnerable.

Testing for the Vulnerability

In addition to checking the sudo version, Qualys provided a simple way to test if a system is vulnerable or not. To test on an individual system, perform the following steps:

  1. Login to the system as a non-root user.
  2. Run command sudoedit -s /
  3. If the system is vulnerable, it will respond with an error that starts with sudoedit:
  4. If the system is patched, it will respond with an error that starts with usage:
Remediation

Raxis recommends patching any affected operating system using the vulnerable sudo versions. A list of advisories with links to patches that remediate the vulnerability from various operating system vendors is below:

* https://blog.qualys.com/vulnerabilities-research/2021/01/26/cve-2021-3156-heap-based-buffer-overflow-in-sudo-baron-samedit

Raxis Attack

Continuous, expert-led PTaaS combined with advanced automation to uncover and address hidden vulnerabilities, ensuring your business stays ahead of evolving cyber threats while maintaining regulatory compliance.

Raxis Protect

Continuous vulnerability scanning, real-time asset management, and expert guidance to proactively identify and address security gaps across your entire digital ecosystem, ensuring 24/7 protection against evolving cyber threats.

Raxis Strike

Tailored, expert-led penetration testing that uncovers hidden vulnerabilities using real-world hacker techniques, providing actionable insights to strengthen your defenses and protect against sophisticated cyber threats.

Partner With Raxis

Partnering with Raxis empowers your business with elite penetration testing services, competitive reseller pricing, and recurring revenue opportunities, all backed by a proven track record of excellence and a commitment to staying ahead of evolving cybersecurity threats.

More From Raxis

  • Cybersecurity: It’s how to say “Yes.”

    By Mark Puckett • December 31, 2024
  • Accepting Penetration Test Risks & How Compensating Controls Can Help

    Accepting Penetration Test Risks & How Compensating Controls Can Help

    By Tim Semchenko • December 17, 2024
  • Cool Tools Series: Masscan

    Cool Tools Series: Masscan

    By Andrew Trexler • December 3, 2024
  • Meet the Team: Jason Taylor

    Meet the Team: Jason Taylor, Lead Penetration Tester

    By Jason Taylor • November 19, 2024
  • Password Series: Defeating Emerging Password Security Trends with Psudohash

    Password Series: Defeating Emerging Password Security Trends with Psudohash

    By Ryan Chaplin • November 5, 2024
  • Why Raxis Attack is a Huge Win for Organizations

    Why Raxis Attack is a Huge Win for Organizations

    By Caroline Kelly • October 22, 2024