search menu icon-carat-right cmu-wordmark

CERT Coordination Center

Sudo set_cmd() is vulnerable to heap-based buffer overflow

Vulnerability Note VU#794544

Original Release Date: 2021-02-04 | Last Revised: 2021-04-26

Overview

A heap-based overflow has been discovered in the set_cmd() function in sudo, which may allow a local attacker to execute commands with elevated administrator privileges.

Description

From the Sudo Main Page:

Sudo (su "do") allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.

It is possible for a local Non-administrative user to exploit this vulnerability to elevate their privileges so that they can execute commands with administrator privileges. The team at Qualys assigned this vulnerability CVE-2021-3156 and found multiple *nix operating systems were vulnerable, including Fedora, Debian, and Ubuntu. A blog update from February 3, 2021, reports that macOS, AIX, and Solaris may be vulnerable, but Qualys had not yet confirmed this. There is additional reporting that other operating systems are affected, including Apple’s Big Sur.

Impact

If an attacker has local access to an affected machine then it is possible for them to execute commands with administrator privileges.

Solution

Apply an Update

Update sudo to the latest version to address this vulnerability when operationally feasible. This issue is resolved in sudo version 1.9.5p2. Please install this version, or a version from your distribution that has the fix applied to it

Acknowledgements

This vulnerability was researched and reported by the Qualys Research Team.

This document was written by Timur Snoke.

Vendor Information

794544
 

View all 87 vendors View less vendors


Other Information

CVE IDs: CVE-2021-3156
Date Public: 2021-01-26
Date First Published: 2021-02-04
Date Last Updated: 2021-04-26 14:25 UTC
Document Revision: 18

Sponsored by CISA.