Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Application Security

1/27/2021
04:55 PM
Connect Directly
Twitter
LinkedIn
RSS
E-Mail
50%
50%

Critical Vulnerability Patched in 'sudo' Utility for Unix-Like OSes

Flaw exists in versions of sudo going back nearly 10 years; USCYBERCOM recommends organizations patch immediately.

The maintainer of sudo, a utility in nearly all Unix and Linux-based operating systems, this week patched a critical buffer overflow vulnerability in the program that gives unauthenticated local users a way to gain root privileges on a host system.

Qualys security researchers who discovered the nearly 10-year-old bug (CVE-2021-3156) say it was first introduced in July 2011 and impacts all versions of sudo from 1.8.2 to 1.8.31p2 and 1.9.0 through 1.9.5p1.

Related Content:

DreamBus, FreakOut Botnets Pose New Threat to Linux Systems

Special Report: 2021 Top Enterprise IT Trends

New From The Edge: Learn SAML: The Language You Don't Know You're Already Speaking

The researchers were able to independently verify the vulnerability and exploit it in multiple ways to gain root privileges on Debian 10 with sudo 1.8.27; Ubuntu 20.04 and sudo 1.8.31; and Fedora 33 with sudo 1.9.2, according to Qualys. Other operating systems and distributions are likely vulnerable to the same issue.

No mitigations are available for the threat. Qualys recommends that all organizations using Unix and Linux distributions with sudo-enabled in them immediately implement vendor supplied patches or upgrade to sudo 1.9.5p2, the latest version of the utility. It was released this week.

"Patching is the only option," says Mehul Revankar, vice president of product management and engineering at Qualys.

The seriousness of the bug prompted a tweet from US Cyber Command (USCYBERCOM) Wednesday, urging organizations to patch as soon as possible. "This is a far more dangerous #Sudo vulnerability than seen in the recent past," it tweeted.

To test whether a system is vulnerable, an admin should log into the system as a non-root user and run the "sudoedit -s /" command.

"If the system is vulnerable, it will respond with an error that starts with 'sudoedit:'," Revankar says. "If the system is patched, it will respond with an error that starts with 'usage:'."

Sudo is a utility that administrators can use to delegate root-level admin authority to specific users or groups of users while copiously logging all their commands and activities. Administrators can use the utility to enable or restrict what commands a user can execute on a host system and to centrally manage user privileges on a per-host basis.

Software engineer Todd Miller, who currently maintains sudo, on Tuesday said the heap-based buffer overflow bug exists in code that executes when sudo runs a command in shell mode via the use of -s and –I options. (Read here for details.) By itself, the bug is harmless. However, the presence of another bug in sudo's command-line parsing code makes the discovery of the new issue dangerous, he notes.

"I'd speculate that it remained undiscovered for so long because it is a combination of two bugs," Revankar says. "Thus, people might have found one bug but disregarded it as useless because they did not find the other."

An attacker would need local access to a vulnerable system in order to exploit the vulnerability. In many instances, this would mitigate the seriousness of the flaw because an adversary that already has access to a system can do a lot of damage with that access.

What makes this flaw dangerous is that an unauthenticated attacker can use it to escalate privileges even if not listed in the "sudoers" file, which allocates admin rights to specific individuals.

"The user does not need to be a privileged user, a local user, or be a part of sudoers list," Revankar says. "For example, even account 'nobody' can exploit the issue. That's why this is so critical."

A local vulnerability usually doesn't require panic since an attacker needs another vulnerability to gain access to the system first, adds Kelly Shortridge, vice president of product strategy at Capsule8.

"In this case, aside from the vulnerability being present for roughly a decade, sudo is a utility that is available by default in most Linux distributions – which makes for a huge potential footprint."

All that is required for an attacker to exploit the vulnerability is shell mode and the presence of a sudoers policy in an organization's Linux infrastructure, she says.

Shortridge says enterprises with a containerized production environment are somewhat protected against the bug.

"If an attacker successfully exploits this vulnerability, they will gain root access in the container but not in the underlying host itself," she notes.

Jai Vijayan is a seasoned technology reporter with over 20 years of experience in IT trade journalism. He was most recently a Senior Editor at Computerworld, where he covered information security and data privacy issues for the publication. Over the course of his 20-year ... View Full Bio
 

Recommended Reading:

Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
Commentary
Ransomware Is Not the Problem
Adam Shostack, Consultant, Entrepreneur, Technologist, Game Designer,  6/9/2021
Edge-DRsplash-11-edge-ask-the-experts
How Can I Test the Security of My Home-Office Employees' Routers?
John Bock, Senior Research Scientist,  6/7/2021
News
New Ransomware Group Claiming Connection to REvil Gang Surfaces
Jai Vijayan, Contributing Writer,  6/10/2021
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
The State of Cybersecurity Incident Response
In this report learn how enterprises are building their incident response teams and processes, how they research potential compromises, how they respond to new breaches, and what tools and processes they use to remediate problems and improve their cyber defenses for the future.
Flash Poll
How Enterprises are Developing Secure Applications
How Enterprises are Developing Secure Applications
Recent breaches of third-party apps are driving many organizations to think harder about the security of their off-the-shelf software as they continue to move left in secure software development practices.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2021-20733
PUBLISHED: 2021-06-22
Improper authorization in handler for custom URL scheme vulnerability in ????????? (asken diet) for Android versions from v.3.0.0 to v.4.2.x allows a remote attacker to lead a user to access an arbitrary website via the vulnerable App.
CVE-2021-20734
PUBLISHED: 2021-06-22
Cross-site scripting vulnerability in Welcart e-Commerce versions prior to 2.2.4 allows remote attackers to inject arbitrary script or HTML via unspecified vectors.
CVE-2021-20735
PUBLISHED: 2021-06-22
Cross-site scripting vulnerability in ETUNA EC-CUBE plugins (Delivery slip number plugin (3.0 series) 1.0.10 and earlier, Delivery slip number csv bulk registration plugin (3.0 series) 1.0.8 and earlier, and Delivery slip number mail plugin (3.0 series) 1.0.8 and earlier) allows remote attackers to ...
CVE-2021-20736
PUBLISHED: 2021-06-22
NoSQL injection vulnerability in GROWI versions prior to v4.2.20 allows a remote attacker to obtain and/or alter the information stored in the database via unspecified vectors.
CVE-2021-20737
PUBLISHED: 2021-06-22
Improper authentication vulnerability in GROWI versions prior to v4.2.20 allows a remote attacker to view the unauthorized pages without access privileges via unspecified vectors.