What happened
Sudo contains an off-by-one error that can result in a heap-based buffer overflow, which allows for privilege escalation.
Affected versions
Sudo: See original advisory Fixed: See vendor advisory.
Why it matters
This source correlation may provide earlier visibility while structured CVE metadata is still being updated.
Detection & mitigation
- Review the original advisory and validate affected versions.
- Apply vendor-provided updates or mitigations when available.
Public PoC references
RepositoryAuthorFirst seenReference
Exploit-DB 49521Sudo 1.9.5p1 - 'Baron Samedit ' Heap-Based Buffer Overflow Privilege Escalation (1)West Shepherd2021-02-03VerifiedExploit-DB 49522Sudo 1.9.5p1 - 'Baron Samedit ' Heap-Based Buffer Overflow Privilege Escalation (2)nu11secur1ty2021-02-03VerifiedPoC-in-GitHub · mr-r3b00t/CVE-2021-3156★ 35mr-r3b00t2021-01-26CandidatePoC-in-GitHub · nexcess/sudo_cve-2021-3156★ 0nexcess2021-01-27CandidatePoC-in-GitHub · reverse-ex/CVE-2021-3156CVE-2021-3156★ 112reverse-ex2021-01-27CandidatePoC-in-GitHub · unauth401/CVE-2021-3156★ 1unauth4012021-01-27CandidatePoC-in-GitHub · ymrsmns/CVE-2021-3156CVE-2021-3156★ 0ymrsmns2021-01-27CandidatePoC-in-GitHub · elbee-cyber/CVE-2021-3156-PATCHERThis simple bash script will patch the recently discovered sudo heap overflow vulnerability.★ 3elbee-cyber2021-01-27CandidatePoC-in-GitHub · kernelzeroday/CVE-2021-3156-Baron-Samedit1day research effort★ 18kernelzeroday2021-01-28CandidatePoC-in-GitHub · yaunsky/cve-2021-3156cve-2021-3156;sudo堆溢出漏洞;漏洞检测★ 5yaunsky2021-01-28CandidatePoC-in-GitHub · baka9moe/CVE-2021-3156-Exp★ 4baka9moe2021-01-28CandidatePoC-in-GitHub · ph4ntonn/CVE-2021-3156CVE-2021-3156★ 3ph4ntonn2021-01-28CandidatePoC-in-GitHub · binw2018/CVE-2021-3156-SCRIPT★ 1binw20182021-01-29CandidatePoC-in-GitHub · freeFV/CVE-2021-3156★ 0freeFV2021-01-29CandidatePoC-in-GitHub · mbcrump/CVE-2021-3156Notes regarding CVE-2021-3156: Heap-Based Buffer Overflow in Sudo★ 39mbcrump2021-01-29CandidatePoC-in-GitHub · stong/CVE-2021-3156PoC for CVE-2021-3156 (sudo heap overflow)★ 429stong2021-01-30CandidatePoC-in-GitHub · nobodyatall648/CVE-2021-3156checking CVE-2021-3156 vulnerability & patch script★ 1nobodyatall6482021-01-30CandidatePoC-in-GitHub · blasty/CVE-2021-3156★ 1023blasty2021-01-30CandidatePoC-in-GitHub · teamtopkarl/CVE-2021-3156★ 7teamtopkarl2021-01-31CandidatePoC-in-GitHub · Q4n/CVE-2021-3156复现别人家的CVEs系列★ 2Q4n2021-01-31CandidatePoC-in-GitHub · kal1gh0st/CVE-2021-3156Description Sudo before 1.9.5p2 has a Heap-based Buffer Overflow, allowing privilege escalation to root via "sudoedit -s" and a command-line argument that ends with a single backslash character.★ 3kal1gh0st2021-01-31CandidatePoC-in-GitHub · apogiatzis/docker-CVE-2021-3156A docker environment to research CVE-2021-3156★ 7apogiatzis2021-01-31CandidatePoC-in-GitHub · Ashish-dawani/CVE-2021-3156-PatchPatch Script for CVE-2021-3156 Heap Overflow★ 0Ashish-dawani2021-02-01CandidatePoC-in-GitHub · SantiagoSerrao/ScannerCVE-2021-3156★ 1SantiagoSerrao2021-02-01CandidatePoC-in-GitHub · DanielAzulayy/CTF-2021CTF for HDE 64 students at See Security College. Exploit a JWT (web part) & CVE-2021-3156 (LPE part).★ 0DanielAzulayy2021-02-03CandidatePoC-in-GitHub · dinhbaouit/CVE-2021-3156CVE-2021-3156 Vagrant Lab★ 5dinhbaouit2021-02-03CandidatePoC-in-GitHub · CptGibbon/CVE-2021-3156Root shell PoC for CVE-2021-3156★ 158CptGibbon2021-02-03CandidatePoC-in-GitHub · perlun/sudo-1.8.3p1-patchedCustom version of sudo 1.8.3p1 with CVE-2021-3156 patches applied★ 0perlun2021-02-05CandidatePoC-in-GitHub · 1N53C/CVE-2021-3156-PoC★ 71N53C2021-02-06CandidatePoC-in-GitHub · 0xdevil/CVE-2021-3156CVE-2021-3156: Sudo heap overflow exploit for Debian 10★ 510xdevil2021-02-08CandidatePoC-in-GitHub · gmldbd94/cve-2021-3156보안취약점 확인★ 0gmldbd942021-02-09CandidatePoC-in-GitHub · jm33-m0/CVE-2021-3156sudo heap overflow to LPE, in Go★ 16jm33-m02021-02-09CandidatePoC-in-GitHub · Rvn0xsy/CVE-2021-3156-plusCVE-2021-3156非交互式执行命令★ 205Rvn0xsy2021-02-09CandidatePoC-in-GitHub · oneoy/CVE-2021-3156★ 0oneoy2021-02-23CandidatePoC-in-GitHub · worawit/CVE-2021-3156Sudo Baron Samedit Exploit★ 804worawit2021-03-15CandidatePoC-in-GitHub · lmol/CVE-2021-3156Exploit generator for sudo CVE-2021-3156★ 4lmol2021-03-19CandidatePoC-in-GitHub · BearCat4/CVE-2021-3156CVE-2021-3156漏洞修复Shell★ 1BearCat42021-03-30CandidatePoC-in-GitHub · capturingcats/CVE-2021-3156★ 0capturingcats2021-04-05CandidatePoC-in-GitHub · LiveOverflow/pwneditCVE-2021-3156 - Sudo Baron Samedit★ 225LiveOverflow2021-04-29CandidatePoC-in-GitHub · ajtech-hue/CVE-2021-3156-Mitigation-ShellScript-Build★ 0ajtech-hue2021-05-05CandidatePoC-in-GitHub · donghyunlee00/CVE-2021-3156★ 1donghyunlee002021-06-25CandidatePoC-in-GitHub · TheFlash2k/CVE-2021-3156★ 1TheFlash2k2021-06-30CandidatePoC-in-GitHub · Exodusro/CVE-2021-3156★ 0Exodusro2021-07-26CandidatePoC-in-GitHub · 0x7183/CVE-2021-3156Sudo Heap Overflow Baron Samedit★ 10x71832021-08-13CandidatePoC-in-GitHub · sbladiamond/CVE-2021-3156★ 0sbladiamond2021-09-11CandidatePoC-in-GitHub · redhawkeye/sudo-exploitCVE-2021-3156 - sudo exploit for ubuntu 18.04 & 20.04★ 17redhawkeye2021-09-25CandidatePoC-in-GitHub · d3c3ptic0n/CVE-2021-3156Sudo heap-based buffer overflow privilege escalation commands and mitigations.★ 0d3c3ptic0n2021-09-27CandidatePoC-in-GitHub · musergi/CVE-2021-3156★ 2musergi2021-10-13CandidatePoC-in-GitHub · halissha/CVE-2021-3156CVE-2021-3156 exploit★ 0halissha2021-10-20CandidatePoC-in-GitHub · sharkmoos/Baron-SameditExploit and Demo system for CVE-2021-3156★ 0sharkmoos2021-11-01CandidatePoC-in-GitHub · chenaotian/CVE-2021-3156CVE-2021-3156 POC and Docker and Analysis write up★ 11chenaotian2022-01-27CandidatePoC-in-GitHub · ret2basic/SudoScienceCVE-2021-3156 deep dive.★ 0ret2basic2022-02-14CandidatePoC-in-GitHub · puckiestyle/CVE-2021-3156★ 1puckiestyle2022-03-04CandidatePoC-in-GitHub · barebackbandit/CVE-2021-3156Exploit for CVE-2021-3156★ 0barebackbandit2022-03-10CandidatePoC-in-GitHub · RodricBr/CVE-2021-3156CVE-2021-3156★ 1RodricBr2022-03-18CandidatePoC-in-GitHub · ypl6/heaplensCMPT733 Cybersecurity Lab II Project: GDB plugin for heap exploits inspired by CVE-2021-3156★ 2ypl62022-03-22CandidatePoC-in-GitHub · juju306/CVE-2021-3156sudo提权漏洞CVE-2021-3156复现代码★ 1juju3062022-05-26CandidatePoC-in-GitHub · arvindshima/CVE-2021-3156CVE-2021-3156: Heap-Based Buffer Overflow in Sudo (Baron Samedit)★ 0arvindshima2022-06-24CandidatePoC-in-GitHub · Mhackiori/CVE-2021-3156Visualization, Fuzzing, Exploit and Patch of Baron Samedit Vulnerability★ 5Mhackiori2022-07-04CandidatePoC-in-GitHub · PhuketIsland/CVE-2021-3156-centos7利用sudo提权,只针对cnetos7★ 30PhuketIsland2022-11-03CandidatePoC-in-GitHub · 0x4ndy/clifclif is a command-line interface (CLI) application fuzzer, pretty much what wfuzz or ffuf are for web. It was inspired by sudo vulnerability CVE-2021-3156 and the fact that for some reasons, Google's afl-fuzz doesn't allow for unlimited argument or option specification.★ 1000x4ndy2022-11-28CandidatePoC-in-GitHub · hycheng15/CVE-2021-3156★ 0hycheng152022-12-25CandidatePoC-in-GitHub · mutur4/CVE-2021-3156Baron SameEdit Heap Overflow LPE 1-Day Exploit★ 0mutur42023-05-11CandidatePoC-in-GitHub · PurpleOzone/PE_CVE-CVE-2021-3156Exploit for Ubuntu 20.04 using CVE-2021-3156 enhanced with post-exploitation scripts★ 7PurpleOzone2023-05-13CandidatePoC-in-GitHub · asepsaepdin/CVE-2021-3156★ 0asepsaepdin2023-09-05CandidatePoC-in-GitHub · DDayLuong/CVE-2021-3156★ 0DDayLuong2023-12-27CandidatePoC-in-GitHub · DASICS-ICT/DASICS-CVE-2021-3156★ 1DASICS-ICT2023-12-30CandidatePoC-in-GitHub · wurwur/CVE-2021-3156Different files for computer security coursework★ 0wurwur2024-01-22CandidatePoC-in-GitHub · lypd0/CVE-2021-3156-checkerChecker for CVE-2021-3156 with static version check★ 2lypd02024-05-14CandidatePoC-in-GitHub · Bad3r/CVE-2021-3156-without-ip-commandfork of worawit/CVE-2021-3156 exploit_nss.py modified to work with ifconfig instead of the ip command★ 0Bad3r2024-11-13CandidatePoC-in-GitHub · Sebastianbedoya25/CVE-2021-3156★ 0Sebastianbedoya252024-12-03CandidatePoC-in-GitHub · czeti/baron-sameditThis repository contains a Proof-of-Concept (PoC) exploit for the Baron Samedit vulnerability (CVE-2021-3156). The exploit demonstrates privilege escalation on Ubuntu 20.04 with sudo version 1.8.31 and glibc version 2.31. It includes an assembly-based exploit, a shared object payload, and a Makefile for automated compilation.★ 0czeti2025-02-08CandidatePoC-in-GitHub · Sornphut/CVE-2021-3156-Heap-Based-Buffer-Overflow-in-Sudo-Baron-Samedit-★ 0Sornphut2025-03-10CandidatePoC-in-GitHub · shishirpandey18/CVE-2021-3156★ 0shishirpandey182025-05-12CandidatePoC-in-GitHub · Shuhaib88/Baron-Samedit-Heap-Buffer-Overflow-CVE-2021-3156★ 1Shuhaib882025-05-23CandidatePoC-in-GitHub · gmh5225/cve-2021-3156-★ 0gmh52252025-06-04CandidatePoC-in-GitHub · TopskiyPavelQwertyGang/Review.CVE-2021-3156CVE-2021-3156-Exploit-Demo★ 0TopskiyPavelQwertyGang2025-06-09CandidatePoC-in-GitHub · Maalfer/Sudo-CVE-2021-3156Exploit para explotar la vulnerabilidad CVE-2025-32463★ 8Maalfer2025-07-18CandidatePoC-in-GitHub · HuzaifaTariqAfzalKhan/CVE-Exploit-Research-Development-ITSOLERAA research regarding the exisiting CVE exploit : CVE-2021-3156(Sudo BufferOverflow)★ 0HuzaifaTariqAfzalKhan2025-08-25CandidatePoC-in-GitHub · VilmarTuminskii/cve-2021-3156-sudo-labProjeto educacional desenvolvido em Python com foco na análise da vulnerabilidade CVE-2021-3156 (Baron Samedit), uma falha crítica no sudo que permitia elevação de privilégio local em sistemas Linux.★ 0VilmarTuminskii2026-01-02CandidatePoC-in-GitHub · DakerQirszh/cve-2021-3156fixed version★ 0DakerQirszh2026-01-05CandidatePoC-in-GitHub · TheLeopard65/CVE-2021-3156-Baron-SameditA simple Docker lab and Exploit setup for CVE-2021-3156 - "Baron Samedit".★ 1TheLeopard652026-03-11CandidatePoC-in-GitHub · Rana-Ali93/CVE-2021-3156-Sudo-Buffer-Overflow-LinuxRed Team exploitation of CVE-2021-3156 (Baron Samedit) – Heap Buffer Overflow in Sudo leading to Local Privilege Escalation on Ubuntu 20.04★ 0Rana-Ali932026-03-18CandidatePoC-in-GitHub · ngtuonghung/CVE-2021-3156POC for CVE-2021-3156 - Heap-based buffer overflow in sudo★ 0ngtuonghung2026-03-19CandidatePoC-in-GitHub · Robblackcatchai/porfolio-Baron-Sameditthis is a study about CVE-2021-3156: Heap-Based Buffer Overflow in Sudo (Baron Samedit)★ 0Robblackcatchai2026-05-27CandidatePoC-in-GitHub · calonnuotcabe/CVE-2021-3156Exploiting heap-based buffer overflow in sudo for privilege escalation★ 2calonnuotcabe2026-05-30CandidatePoC-in-GitHub · Kranti08/CVE-2021-3156-Baron-SameditExploitation and mitigation analysis of CVE-2021-3156 heap-based buffer overflow in sudo★ 0Kranti082026-06-17CandidatePoC-in-GitHub · IJBaig/CVE-2021-3156CVE-2021-3156 (Baron Samedit) Report and Research★ 0IJBaig2026-07-07CandidatePoC-in-GitHub · WhatsWrongAndWhy/CVE-2021-3156★ 0WhatsWrongAndWhy2026-07-21CandidatePoC-in-GitHub · Shams-Ul-Mehmood/CVE-2021-3156-Project★ 0Shams-Ul-Mehmood2026-08-07CandidateSource timeline
Discovered through CISA Known Exploited VulnerabilitiesView source ↗
Added to CISA Known Exploited Vulnerabilities catalogView source ↗
Record history
Record created from the first normalized source observation.
Metadata and source references refreshed.