# What is CVE-2021-3156?

> CVE-2021-3156 is a high-severity flaw (CVSS 7.8) in Sudo from Sudo Project, published on 26 January 2021. It is on the list of flaws known to be exploited, so criminals are already using it. The latest forecast puts its chance of use in the next 30 days at over 99%. If you run an affected version, patch it first.

Canonical page: https://www.precursorintelligence.com/what-is/cve-2021-3156

## At a glance

- **Verdict:** Fix this now. Attackers are using this flaw today. If you run an affected version, it goes to the top of your list.
- **Precursor Intelligence risk score:** 75 out of 100 (High); action: Emergency patch. Kept up to date as the evidence changes.
- **Severity:** High (CVSS 7.8 out of 10)
- **Known to be exploited:** Yes, it is on the government list of flaws known to be exploited
- **Chance of use in the next 30 days:** over 99% (latest exploit-likelihood forecast)
- **Published:** 26 January 2021
- **Record last updated:** 22 October 2025
- **Main product:** Sudo from Sudo Project
- **Affected products:** 24

## What is CVE-2021-3156? In plain terms

An attacker has to be already on the device with an ordinary user account, and nobody has to click anything. If it works, the attacker can read data, change data and take it offline.

### The official description

Sudo before 1.9.5p2 contains an off-by-one error that can result in a heap-based buffer overflow, which allows privilege escalation to root via "sudoedit -s" and a command-line argument that ends with a single backslash character.

### What kind of flaw is it?

- CWE-193: Off-by-one Error

### How an attack on it works

- Where an attacker can be: Already on the device
- How hard it is to pull off: Easy: no special conditions
- Login needed first: An ordinary user account
- Does someone have to click: No, nobody has to do anything
- What an attacker gets: Can read data, change data and take it offline

Severity vector: `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## Is CVE-2021-3156 being exploited? Yes

Attackers are already using it. It is on the government list of flaws known to be exploited, and the latest forecast puts the chance of it being used in the next 30 days at over 99%.

Exploit likelihood over the last 7 days: >99%, >99%, >99%, >99%, >99%, >99%, >99%.

### Timeline

- 26 January 2021: Published
- 22 October 2025: Record last updated

### How Precursor Intelligence ranks it

CVE-2021-3156 scores **75 out of 100 (High)**, with the action "Emergency patch".

Every published flaw gets a risk score from 0 to 100, kept up to date as the evidence changes. Four things go into the score, from the one that counts most to the ones that count less:

- Evidence it is being exploited: biggest factor
- How severe it is: strong factor
- How widely exposed it is: smaller factor
- Threat activity around it: smaller factor

85 and above is Critical. Anything confirmed as exploited is always marked for an emergency patch, whatever its score. When this flaw matches software you track, it lands in your list with its score and the reasons behind it.

## Who is affected by CVE-2021-3156?

The published record lists 24 products. Versions are as published: "1.8.2 to before 1.8.32" means from 1.8.2 up to, but not including, 1.8.32.

- [Sudo](https://www.precursorintelligence.com/product/sudo_project/sudo) by [Sudo Project](https://www.precursorintelligence.com/vendors/sudo_project) (Application): 1.8.2 to before 1.8.32, 1.9.0 to before 1.9.5, 1.9.5, 1.9.5-patch1
- [Web Gateway](https://www.precursorintelligence.com/product/mcafee/web_gateway) by [Mcafee](https://www.precursorintelligence.com/vendors/mcafee) (Application): 8.2.17, 9.2.8, 10.0.4
- [Communications Performance Intelligence Center](https://www.precursorintelligence.com/product/oracle/communications_performance_intelligence_center) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Application): 10.3.0.0.0 to 10.3.0.2.1, 10.4.0.1.0 to 10.4.0.3.1
- [Debian Linux](https://www.precursorintelligence.com/product/debian/debian_linux) by [Debian](https://www.precursorintelligence.com/vendors/debian) (Operating system): 9.0, 10.0
- [Fedora](https://www.precursorintelligence.com/product/fedoraproject/fedora) by [Fedoraproject](https://www.precursorintelligence.com/vendors/fedoraproject) (Operating system): 32, 33
- [Active Iq Unified Manager](https://www.precursorintelligence.com/product/netapp/active_iq_unified_manager) by [Netapp](https://www.precursorintelligence.com/vendors/netapp) (Application): version not specified
- [Cloud Backup](https://www.precursorintelligence.com/product/netapp/cloud_backup) by [Netapp](https://www.precursorintelligence.com/vendors/netapp) (Application): version not specified
- [Diskstation Manager](https://www.precursorintelligence.com/product/synology/diskstation_manager) by [Synology](https://www.precursorintelligence.com/vendors/synology) (Operating system): 6.2
- [Diskstation Manager Unified Controller](https://www.precursorintelligence.com/product/synology/diskstation_manager_unified_controller) by [Synology](https://www.precursorintelligence.com/vendors/synology) (Application): 3.0
- [Hci Management Node](https://www.precursorintelligence.com/product/netapp/hci_management_node) by [Netapp](https://www.precursorintelligence.com/vendors/netapp) (Application): version not specified
- [Micros Compact Workstation 3 Firmware](https://www.precursorintelligence.com/product/oracle/micros_compact_workstation_3_firmware) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Operating system): 310
- [Micros Es400 Firmware](https://www.precursorintelligence.com/product/oracle/micros_es400_firmware) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Operating system): 400 to 410
- [Micros Kitchen Display System Firmware](https://www.precursorintelligence.com/product/oracle/micros_kitchen_display_system_firmware) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Operating system): 210
- [Micros Workstation 5a Firmware](https://www.precursorintelligence.com/product/oracle/micros_workstation_5a_firmware) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Operating system): 5a
- [Micros Workstation 6 Firmware](https://www.precursorintelligence.com/product/oracle/micros_workstation_6_firmware) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Operating system): 610 to 655
- [Oncommand Unified Manager Core Package](https://www.precursorintelligence.com/product/netapp/oncommand_unified_manager_core_package) by [Netapp](https://www.precursorintelligence.com/vendors/netapp) (Application): version not specified
- [Ontap Select Deploy Administration Utility](https://www.precursorintelligence.com/product/netapp/ontap_select_deploy_administration_utility) by [Netapp](https://www.precursorintelligence.com/vendors/netapp) (Application): version not specified
- [Ontap Tools](https://www.precursorintelligence.com/product/netapp/ontap_tools) by [Netapp](https://www.precursorintelligence.com/vendors/netapp) (Application): 9
- [Privilege Management for Mac](https://www.precursorintelligence.com/product/beyondtrust/privilege_management_for_mac) by [Beyondtrust](https://www.precursorintelligence.com/vendors/beyondtrust) (Application): before 21.1.1
- Privilege Management for Unix/linux by [Beyondtrust](https://www.precursorintelligence.com/vendors/beyondtrust) (Application): before 10.3.2-10
- [Skynas Firmware](https://www.precursorintelligence.com/product/synology/skynas_firmware) by [Synology](https://www.precursorintelligence.com/vendors/synology) (Operating system): version not specified
- [Solidfire](https://www.precursorintelligence.com/product/netapp/solidfire) by [Netapp](https://www.precursorintelligence.com/vendors/netapp) (Application): version not specified
- [Tekelec Platform Distribution](https://www.precursorintelligence.com/product/oracle/tekelec_platform_distribution) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Application): 7.4.0 to 7.7.1
- [Vs960hd Firmware](https://www.precursorintelligence.com/product/synology/vs960hd_firmware) by [Synology](https://www.precursorintelligence.com/vendors/synology) (Operating system): version not specified

## How do I fix CVE-2021-3156?

1. **Check whether you run it.** Compare your versions with the affected products above. Not sure what you run? Precursor Intelligence can work it out from your public website, or you can pick it from a list.
2. **Apply the vendor’s fix.** Install the update named in the vendor’s advisory. We’ve put the advisories and patch notes first in the list.
3. **If you can’t patch today.** Follow any mitigation the vendor publishes, and limit who can reach the affected system from the internet until the update is in.
4. **Check it wasn’t used before you patched.** Because criminals are already using this flaw, look for signs of a break-in on affected systems using the vendor’s guidance.

### References

- [openwall.com](http://www.openwall.com/lists/oss-security/2021/09/14/2) (Mailing list, Patch, Third-party advisory)
- [oracle.com](https://www.oracle.com//security-alerts/cpujul2021.html) (Patch, Third-party advisory)
- [oracle.com](https://www.oracle.com/security-alerts/cpuapr2022.html) (Patch, Third-party advisory)
- [oracle.com](https://www.oracle.com/security-alerts/cpuoct2021.html) (Patch, Third-party advisory)
- [packetstormsecurity.com](http://packetstormsecurity.com/files/161160/Sudo-Heap-Based-Buffer-Overflow.html) (Exploit, Third-party advisory, Vulnerability database)
- [packetstormsecurity.com](http://packetstormsecurity.com/files/161230/Sudo-Buffer-Overflow-Privilege-Escalation.html) (Exploit, Third-party advisory, Vulnerability database)
- [packetstormsecurity.com](http://packetstormsecurity.com/files/161270/Sudo-1.9.5p1-Buffer-Overflow-Privilege-Escalation.html) (Exploit, Third-party advisory, Vulnerability database)
- [packetstormsecurity.com](http://packetstormsecurity.com/files/161293/Sudo-1.8.31p2-1.9.5p1-Buffer-Overflow.html) (Exploit, Third-party advisory, Vulnerability database)
- [packetstormsecurity.com](http://packetstormsecurity.com/files/176932/glibc-syslog-Heap-Based-Buffer-Overflow.html) (Exploit, Third-party advisory, Vulnerability database)
- [seclists.org](http://seclists.org/fulldisclosure/2021/Feb/42) (Mailing list, Third-party advisory)
- [seclists.org](http://seclists.org/fulldisclosure/2021/Jan/79) (Exploit, Mailing list, Third-party advisory)
- [seclists.org](http://seclists.org/fulldisclosure/2024/Feb/3) (Exploit, Mailing list, Third-party advisory)
- [openwall.com](http://www.openwall.com/lists/oss-security/2021/01/26/3) (Exploit, Mailing list, Third-party advisory)
- [openwall.com](http://www.openwall.com/lists/oss-security/2021/01/27/1) (Mailing list, Third-party advisory)
- [openwall.com](http://www.openwall.com/lists/oss-security/2021/01/27/2) (Mailing list, Third-party advisory)
- [openwall.com](http://www.openwall.com/lists/oss-security/2021/02/15/1) (Exploit, Mailing list, Third-party advisory)
- [openwall.com](http://www.openwall.com/lists/oss-security/2024/01/30/6) (Exploit, Mailing list)
- [openwall.com](http://www.openwall.com/lists/oss-security/2024/01/30/8) (Mailing list)
- [kc.mcafee.com](https://kc.mcafee.com/corporate/index?page=content&id=SB10348) (Broken link, Third-party advisory)
- [lists.debian.org](https://lists.debian.org/debian-lts-announce/2021/01/msg00022.html) (Mailing list, Third-party advisory)
- [lists.fedoraproject.org](https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CALA5FTXIQBRRYUA2ZQNJXB6OQMAXEII/) (Mailing list, Release notes)
- [lists.fedoraproject.org](https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LHXK6ICO5AYLGFK2TAX5MZKUXTUKWOJY/) (Mailing list, Release notes)
- [security.gentoo.org](https://security.gentoo.org/glsa/202101-33) (Third-party advisory)
- [security.netapp.com](https://security.netapp.com/advisory/ntap-20210128-0001/) (Third-party advisory)
- [security.netapp.com](https://security.netapp.com/advisory/ntap-20210128-0002/) (Third-party advisory)
- [support.apple.com](https://support.apple.com/kb/HT212177) (Third-party advisory)
- [tools.cisco.com](https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-sudo-privesc-jan2021-qnYQfcM) (Third-party advisory)
- [beyondtrust.com](https://www.beyondtrust.com/blog/entry/security-advisory-privilege-management-for-unix-linux-pmul-basic-and-privilege-management-for-mac-pmm-affected-by-sudo-vulnerability) (Third-party advisory)
- [debian.org](https://www.debian.org/security/2021/dsa-4839) (Third-party advisory)
- [kb.cert.org](https://www.kb.cert.org/vuls/id/794544) (Third-party advisory, Government resource)
- [sudo.ws](https://www.sudo.ws/stable.html#1.9.5p2) (Release notes)
- [synology.com](https://www.synology.com/security/advisory/Synology_SA_21_02) (Third-party advisory)
- [vicarius.io](https://www.vicarius.io/vsociety/posts/sudoedit-pwned-cve-2021-3156) (Exploit, Third-party advisory)

## Questions

### What is CVE-2021-3156?

CVE-2021-3156 is a high-severity flaw in Sudo from Sudo Project, published on 26 January 2021. An attacker has to be already on the device with an ordinary user account, and nobody has to click anything. If it works, the attacker can read data, change data and take it offline.

### How serious is CVE-2021-3156?

It scores 7.8 out of 10 on the CVSS severity scale, which is high. Our risk score for CVE-2021-3156 is 75 out of 100, which is High. Its action is "Emergency patch". Attackers are using this flaw today. If you run an affected version, it goes to the top of your list.

### Is CVE-2021-3156 being exploited?

Attackers are already using it. It is on the government list of flaws known to be exploited, and the latest forecast puts the chance of it being used in the next 30 days at over 99%.

### Which versions does CVE-2021-3156 affect?

For Sudo from Sudo Project: 1.8.2 to before 1.8.32, 1.9.0 to before 1.9.5, 1.9.5, 1.9.5-patch1. The record lists 24 products in all, each with its versions, under "Who is affected" on this page.

### How do I fix CVE-2021-3156?

Install the update the vendor names in its advisory, linked first under "How do I fix" on this page. If you can't patch today, follow the vendor's mitigation and limit who can reach the affected system from the internet. Because criminals are already using it, also check affected systems for signs of a break-in.

## Does CVE-2021-3156 affect you?

Precursor Intelligence keeps checking for you:

- **Tell us what you run.** Pick your software from a list, or let us work it out from your website.
- **We match it to every flaw.** Over 400,000 published flaws, checked against your list.
- **Ranked by real-world risk.** Every flaw gets a 0 to 100 risk score, kept up to date, led by evidence criminals are using it.
- **Told as soon as we know.** An alert by email, in the app or by webhook to your own tools.

Start free (no card, nothing to install): https://www.precursorintelligence.com/register
Book a demo: https://www.precursorintelligence.com/contact

