CVE-2021-3156: Baron Samedit
- Vendors
- NetAppOracle CorporationDebian ProjectSynologyFedora ProjectBeyondtrustSudoMcafee
Baron Samedit is a heap-based buffer overflow in Sudo's command-line argument processing, including the set_cmd() function. An off-by-one error can be triggered by invoking sudoedit in shell mode with a crafted argument ending in a single backslash, allowing a local unprivileged user to execute arbitrary code as root. Affected upstream versions are 1.8.2 through 1.8.31p2 and 1.9.0 through 1.9.5p1, including default configurations. Exploitation does not require sudo authorization or password authentication. The upstream fix is available in version 1.9.5p2.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation permits escalation from an ordinary local account to root, compromising system confidentiality, integrity, and availability. An attacker can access protected data and credentials, modify system configuration, disable security controls, install persistent malware, and disrupt services. Exploitation attempts can also crash affected processes. Linux-based appliances incorporating vulnerable Sudo packages are affected as well as general-purpose operating systems.
Mitigation
If you can’t patch tonight, do this now.
If immediate patching is impossible, restrict execution of the vulnerable Sudo utilities to trusted users and monitor for suspicious local execution and privilege escalation. Merely removing sudoers permissions is insufficient because exploitation does not require sudo authorization. For AC2000 versions before 10.6, the vendor recommends removing the sudo package as an interim measure. Validate operational dependencies and preserve an alternative administrative access method before restricting or removing Sudo.
Remediation
Patch, then assume compromise.
Upgrade Sudo to version 1.9.5p2 or later, or install the operating-system vendor's fixed package, including backported security updates. Update affected sudo and sudo-ldap packages where applicable. For affected Johnson Controls deployments, apply Ubuntu security updates to exacqVision systems; upgrade Tyco AI to 1.3, VideoEdge to 5.7.0, and AC2000 to 10.6. VideoEdge 5.4.2 and 5.6.0 also have dedicated Sudo patches; 5.4.1 and older require an upgrade. Fixed Tyco Illustra releases are Pro Gen 3 2.8.0, Flex Gen 2 1.9.4, and Insight 1.4.0; Pro 2 is end-of-life with no fixed version identified.
Exploits
28 exploits validated by Mallory's analysis. Hidden: 19 rejected by Mallory's analysis as not a working exploit; 2 not yet analyzed, such as Exploit-DB entries. Showing the 25 most capable, earliest first.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2021-3156 exploited in the wild?
- Yes. As of Dec 2, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Apr 6, 2022.
- Is there a public exploit for CVE-2021-3156?
- Yes. Mallory tracks 28 public exploits or proofs of concept for CVE-2021-3156, the earliest disclosed Jan 26, 2021.
- Is there a patch for CVE-2021-3156?
- Upgrade Sudo to version 1.9.5p2 or later, or install the operating-system vendor's fixed package, including backported security updates. Update affected sudo and sudo-ldap packages where applicable.
- What products are affected by CVE-2021-3156?
- Sudo, NetApp Activeiq Unified Manager, NetApp Cloud Backup, Oracle Corporation Communications Performance Intelligence Center, Debian Project Debian Linux, and at least 19 more.
- How severe is CVE-2021-3156?
- CVE-2021-3156 has a CVSS v3.1 score of 7.8 (High) and an EPSS score of 100.0% (100th percentile) as of Dec 2, 2026.
Recent activity
53 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.