Heap-based buffer overflow in Sudo - CVE-2021-3156

 

Heap-based buffer overflow in Sudo - CVE-2021-3156

Published: January 26, 2021 / Updated: May 18, 2025


Vulnerability identifier: #VU50040
CSH Severity: Low
CVSS v4: 8.5 [CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2021-3156
CWE-ID: CWE-122
Exploitation vector: Local access
Exploit availability: The vulnerability is being exploited in the wild

Vulnerability details

The vulnerability allows a local user to escalate privileges on the system.

The vulnerability exists due to a boundary error in sudo. A local user can pass specially crafted data to the application, trigger heap-based buffer overflow and execute arbitrary code on the target system with root privileges.



Affected software

Sudo
Traffix SDC
SUSE Linux Enterprise Server 12 SP5 LTSS Extended
SUSE Linux Enterprise Server 12 SP5
ClevOS
Gentoo Linux
Amazon Linux AMI
SUSE Linux Enterprise Server for SAP Applications 12
SUSE Linux Enterprise Server 12
SUSE Linux Enterprise High Performance Computing 12
SUSE Manager Retail Branch Server
SUSE Manager Server
SUSE Manager Proxy
SUSE CaaS Platform
SUSE MicroOS
Red Hat Enterprise Linux Server - Extended Life Cycle Support (for IBM z Systems)
Red Hat Enterprise Linux Server - Extended Life Cycle Support
SUSE Enterprise Storage
Red Hat Enterprise Linux for IBM System z (Structure A)
Red Hat Enterprise Linux for Power 9
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux for Scientific Computing
Red Hat Enterprise Linux for Power, big endian
Red Hat Enterprise Linux for IBM z Systems
CentOS
Red Hat Enterprise Linux Workstation
Red Hat Enterprise Linux Server
SUSE OpenStack Cloud
Red Hat Enterprise Linux Desktop
Red Hat Enterprise Linux Server - AUS
Red Hat Enterprise Linux Server - TUS
Red Hat Enterprise Linux for Power, little endian - Extended Update Support
Red Hat Enterprise Linux for Power, big endian - Extended Update Support
Red Hat Enterprise Linux EUS Compute Node
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux for x86_64 - Extended Update Support
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux for ARM 64
SUSE OpenStack Cloud Crowbar
HPE Helion Openstack
Red Hat Enterprise Linux for ARM 64 - Extended Update Support
macOS
Oracle Solaris
SUSE Linux Enterprise Server for SAP
SUSE Linux Enterprise Server
SUSE Linux Enterprise Software Development Kit
Ubuntu
Slackware Linux
SUSE Linux Enterprise High Performance Computing
SUSE Linux Enterprise Module for Basesystem
openEuler
Fedora
DB2 on Cloud Pak for Data
DB2 Warehouse on Cloud Pak for Data
TXpert Hub CoreTec 4
Tanzu Greenplum for Kubernetes
Aruba Analytics and Location Engine
Data Computing Appliance (DCA)
Disk Library for mainframe (DLm)
PowerScale OneFS
Pro 2
MICROS Workstation 5A
LANTIME Operating System Firmware (LTOS)
MICROS Kitchen Display System Hardware
MICROS Compact Workstation 3
Insight
Flex Gen 2
Pro Gen 3
Tyco AI
cockpit-ovirt (Red Hat package)
imgbased (Red Hat package)
sudo (Debian package)
sudo (Alpine package)
sssd (Red Hat package)
redhat-release-virtualization-host (Red Hat package)
redhat-virtualization-host (Red Hat package)
vdsm (Red Hat package)
Red Hat Enterprise Linux Server for x86_64 - Update Services for SAP Solutions
Red Hat Enterprise Linux Server for Power LE - Update Services for SAP Solutions
sudo (Ubuntu package)
sudo (Red Hat package)
sudo-debugsource
sudo
sudo-debuginfo
sudo-ldap (Ubuntu package)
sudo-devel
sudo-help
IBM Integrated Analytics System
Ansible Automation Platform
CEM Systems AC2000
Oracle Communications Performance Intelligence Center (PIC) Software
Isolation Segment
VMware Tanzu Application Service for VMs
VideoEdge
Red Hat Virtualization
Red Hat Virtualization for IBM Power LE
VMware Tanzu Operations Manager
Red Hat Virtualization Host
RSA Authentication Manager
Dell EMC NetWorker vProxy
Dell EMC Unity XT Operating Environment (OE)
Dell EMC Unity VSA Operating Environment (OE)
Dell EMC Unity Operating Environment (OE)
Dell EMC VxRail Appliance

How to mitigate CVE-2021-3156

Install update from vendor's website.

Sudo - update to 1.9.5p2
Tyco AI - update to 1.3
cockpit-ovirt (Red Hat package) - update to 0.14.17-1.el8ev
IBM Integrated Analytics System - update to 1.0.31.0
Ansible Automation Platform - update to 1.2.4
imgbased (Red Hat package) - update to 1.2.16-0.1.el8ev
sudo (Debian package) - update to 1.8.27-1+deb10u3
sudo (Alpine package) - update to 1.9.5p2-r0
TXpert Hub CoreTec 4 - update to 2.3.0
sssd (Red Hat package) - update to 2.3.0-9.el8
redhat-release-virtualization-host (Red Hat package) - addressed in versions 4.3.13-2.el7ev, 4.4.4-1.el8ev
redhat-virtualization-host (Red Hat package) - addressed in versions 4.3.13-20210127.0.el7_9, 4.4.4-20210201.0.el8_3
vdsm (Red Hat package) - update to 4.30.51-1.el7ev
LANTIME Operating System Firmware (LTOS) - addressed in versions 6.24.028, 7.02.002
CEM Systems AC2000 - update to 10.6
macOS - addressed in versions 10.14.6 18G8022, 10.15.7 19H524, 11.2.1 20D74
Insight - update to 1.4.0
sudo (Ubuntu package) - addressed in versions 1.8.3p1-1ubuntu3.10, 1.8.9p5-1ubuntu1.5+esm6, 1.8.16-0ubuntu1.10, 1.8.21p2-3ubuntu1.4, 1.8.31-1ubuntu1.2, 1.9.1-1ubuntu1.1
sudo (Red Hat package) - addressed in versions 1.8.6p3-29.el6_10.4, 1.8.6p7-17.el7_2.3, 1.8.6p7-23.el7_3.3, 1.8.19p2-12.el7_4.2, 1.8.23-3.el7_6.2, 1.8.23-4.el7_7.3, 1.8.23-10.el7_9.1, 1.8.25p1-8.el8_1.2, 1.8.29-5.el8_2.1, 1.8.29-6.el8_3.1
sudo-debugsource - addressed in versions 1.8.10p3-10.32.1, 1.8.10p3-10.35.1, 1.8.20p2-3.23.1, 1.8.22-4.18.1, 1.8.27-4.15.1, 1.8.27-4.51.1
sudo - addressed in versions 1.8.10p3-10.32.1, 1.8.10p3-10.35.1, 1.8.20p2-3.23.1, 1.8.22-4.18.1, 1.8.27-4.15.1, 1.8.27-4.51.1
sudo-debuginfo - addressed in versions 1.8.10p3-10.32.1, 1.8.10p3-10.35.1, 1.8.20p2-3.23.1, 1.8.22-4.18.1, 1.8.27-4.15.1, 1.8.27-4.51.1
sudo-ldap (Ubuntu package) - addressed in versions 1.8.16-0ubuntu1.10, 1.8.21p2-3ubuntu1.4, 1.8.31-1ubuntu1.2, 1.9.1-1ubuntu1.1
sudo-devel - addressed in versions 1.8.22-4.18.1, 1.8.27-4.15.1, 1.8.27-4.51.1
sudo-devel - update to 1.9.2-2
sudo - update to 1.9.2-2
sudo-debuginfo - update to 1.9.2-2
sudo-debugsource - update to 1.9.2-2
sudo-help - update to 1.9.2-2
Flex Gen 2 - update to 1.9.4
sudo - addressed in versions 1.9.5p2-1.fc32, 1.9.5p2-1.fc33
Tanzu Greenplum for Kubernetes - update to 2.0.0
Aruba Analytics and Location Engine - addressed in versions 2.1.0.4, 2.2.0.0
VMware Tanzu Operations Manager - addressed in versions 2.7.29, 2.9.17, 2.10.6
Isolation Segment - addressed in versions 2.7.30, 2.8.24, 2.9.18, 2.10.10
VMware Tanzu Application Service for VMs - addressed in versions 2.7.31, 2.8.25, 2.9.19, 2.10.11
Pro Gen 3 - update to 2.8.0
Data Computing Appliance (DCA) - update to 4.3.0.0
Dell EMC NetWorker vProxy - update to 4.3.0-12
Dell EMC Unity XT Operating Environment (OE) - update to 5.1.2.0.5.007
Dell EMC Unity VSA Operating Environment (OE) - update to 5.1.2.0.5.007
Dell EMC Unity Operating Environment (OE) - update to 5.1.2.0.5.007
Disk Library for mainframe (DLm) - update to 5.3.0.2
VideoEdge - update to 5.7.0
Dell EMC VxRail Appliance - update to 7.0.240
RSA Authentication Manager - update to 8.5 Patch 3

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins