nomisec
WORKING POC
1,003 stars
by blasty · local
https://github.com/blasty/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156 (Baron Samedit), a heap-based overflow in sudo. The exploit includes a Makefile, brute-force script, and C source code to achieve local privilege escalation by manipulating environment variables and exploiting the vulnerability in sudoedit.
Classification
Working Poc 100%
Target:
sudo (versions 1.8.21, 1.8.27, 1.8.31)
No auth needed
Prerequisites:
Access to a vulnerable system with sudo installed · Ability to execute the exploit binary
nomisec
WORKING POC
794 stars
by worawit · local
https://github.com/worawit/CVE-2021-3156
This repository contains multiple functional exploits for CVE-2021-3156 (Sudo Baron Samedit), a heap-based overflow vulnerability in sudo. The exploits target various Linux distributions and glibc configurations, leveraging techniques such as tcache manipulation and race conditions to achieve privilege escalation.
Classification
Working Poc 100%
Target:
sudo versions 1.8.9-1.8.23
No auth needed
Prerequisites:
Access to a vulnerable sudo binary · Specific Linux distribution and glibc configuration
github
WORKING POC
690 stars
by lockedbyte · cpoc
https://github.com/lockedbyte/CVE-Exploits/tree/master/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit leverages a partial overwrite technique to bypass ASLR and achieve arbitrary code execution via hijacking the `getenv_fn` hook to call `execv()`.
Classification
Working Poc 95%
Target:
sudo versions prior to 1.9.5p2
No auth needed
Prerequisites:
vulnerable sudo version · specific Ubuntu version for offsets · bruteforce for ASLR bypass
nomisec
WORKING POC
434 stars
by stong · local
https://github.com/stong/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). The exploit leverages a race condition to overwrite files (e.g., /etc/passwd) for local privilege escalation (LPE).
Classification
Working Poc 95%
Target:
sudo (versions 1.8.21p2, 1.8.31, and others)
Auth required
Prerequisites:
Access to a local user account with sudo privileges · Ability to modify /etc/passwd or another target file · Tuning of RACE_SLEEP_TIME for race condition reliability
nomisec
WRITEUP
225 stars
by LiveOverflow · poc
https://github.com/LiveOverflow/pwnedit
This repository provides a detailed technical analysis and educational walkthrough of CVE-2021-3156 (Baron Samedit), a heap-based buffer overflow in sudo. It includes Docker environments, fuzzing setups, and step-by-step explanations of the vulnerability's root cause and exploitation process.
Classification
Writeup 100%
Target:
sudo 1.8.31p2
No auth needed
Prerequisites:
Vulnerable sudo version (1.8.31p2 or earlier) · Local access to the target system
nomisec
WORKING POC
203 stars
by Rvn0xsy · local
https://github.com/Rvn0xsy/CVE-2021-3156-plus
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). The exploit leverages heap manipulation to achieve arbitrary command execution as root, with modifications to support command injection without brute-forcing.
Classification
Working Poc 95%
Target:
sudo 1.8.31
No auth needed
Prerequisites:
Vulnerable sudo version (1.8.31 or earlier) · Access to a system with sudoedit binary
nomisec
WORKING POC
156 stars
by CptGibbon · local
https://github.com/CptGibbon/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). The exploit leverages heap manipulation to overwrite a service_user struct and execute arbitrary shellcode, resulting in a root shell.
Classification
Working Poc 100%
Target:
sudo 1.8.31
No auth needed
Prerequisites:
Vulnerable sudo version (1.8.31) · Access to a system with the vulnerable sudo binary
nomisec
WORKING POC
111 stars
by reverse-ex · poc
https://github.com/reverse-ex/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). The exploit includes a shellcode payload (1.c) that escalates privileges to root and a detection script (cve-2021-3156--2021-01-26-1453.sh) to check for vulnerable sudo versions.
Classification
Working Poc 95%
Target:
sudo versions 1.8.6p7-13.ael7b and earlier
No auth needed
Prerequisites:
Vulnerable sudo version · Local access to the target system
nomisec
WORKING POC
99 stars
by 0x4ndy · poc
https://github.com/0x4ndy/clif
This repository contains a functional CLI fuzzer (`clif`) designed to exploit CVE-2021-3156, a heap-based buffer overflow in `sudo`. The tool allows fuzzing command-line arguments with wordlists, number ranges, or string ranges to trigger vulnerabilities like buffer overflows.
Classification
Working Poc 95%
Target:
sudo (versions before 1.9.5p2)
No auth needed
Prerequisites:
Access to a vulnerable `sudo` binary · Ability to execute the fuzzer on the target system
nomisec
WORKING POC
51 stars
by 0xdevil · local
https://github.com/0xdevil/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit includes a compiled binary, a malicious shared library, and debugging tools to trigger the vulnerability on Debian 10 systems with sudo 1.8.27.
Classification
Working Poc 95%
Target:
sudo 1.8.27 on Debian 10
No auth needed
Prerequisites:
Debian 10 with sudo 1.8.27 · Glibc 2.28
nomisec
WRITEUP
39 stars
by mbcrump · local
https://github.com/mbcrump/CVE-2021-3156
This repository provides a detailed technical analysis of CVE-2021-3156, a heap-based buffer overflow in sudo that allows local privilege escalation to root. It includes detection methods, affected versions, and mitigation steps, but does not contain functional exploit code.
Classification
Writeup 90%
Target:
sudo versions 1.8.2 through 1.8.31p2 and 1.9.0 through 1.9.5p1
No auth needed
Prerequisites:
Local access to a vulnerable system
nomisec
WORKING POC
29 stars
by PhuketIsland · local
https://github.com/PhuketIsland/CVE-2021-3156-centos7
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo that allows local privilege escalation. The exploit manipulates environment variables and heap metadata to achieve arbitrary code execution, specifically targeting CentOS 7.
Classification
Working Poc 95%
Target:
sudo versions 1.8.2-1.8.31p2 and 1.9.0-1.9.5p1
Auth required
Prerequisites:
Local access to a vulnerable system · Non-root user privileges
github
WORKING POC
20 stars
by flex0geek · cpoc
https://github.com/flex0geek/cves-exploits/tree/main/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit leverages crafted environment variables and a malicious shared library to achieve privilege escalation.
Classification
Working Poc 95%
Target:
sudo (versions before 1.9.5p2)
No auth needed
Prerequisites:
compilation of exploit components · presence of vulnerable sudo version
nomisec
WORKING POC
18 stars
by kernelzeroday · poc
https://github.com/kernelzeroday/CVE-2021-3156-Baron-Samedit
This repository contains a functional exploit for CVE-2021-3156 (Baron Samedit), a heap-based buffer overflow in sudo. The PoC includes modified sudoedit code and AFL-generated crash cases demonstrating the vulnerability.
Classification
Working Poc 90%
Target:
sudo 1.9.5p1 and earlier
No auth needed
Prerequisites:
Access to a vulnerable sudo binary · Ability to compile modified sudoedit
nomisec
WORKING POC
16 stars
by jm33-m0 · local
https://github.com/jm33-m0/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo that allows local privilege escalation (LPE). The exploit leverages environment variable manipulation and crafted input to trigger the vulnerability, ultimately spawning a root shell.
Classification
Working Poc 95%
Target:
sudo (versions before 1.9.5p2)
No auth needed
Prerequisites:
Local access to a vulnerable system · Presence of sudoedit binary
nomisec
WORKING POC
15 stars
by redhawkeye · poc
https://github.com/redhawkeye/sudo-exploit
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit leverages environment variable manipulation and a malicious shared library to achieve local privilege escalation (LPE) on vulnerable systems.
Classification
Working Poc 95%
Target:
sudo (versions before 1.9.5p2)
No auth needed
Prerequisites:
Vulnerable sudo version · Local access to the target system · Ability to compile and execute the exploit
nomisec
WORKING POC
10 stars
by chenaotian · local
https://github.com/chenaotian/CVE-2021-3156
This repository contains a functional exploit (exp.c) for CVE-2021-3156, a heap-based buffer overflow in sudo's argument parsing, leading to local privilege escalation. It includes a detailed technical writeup explaining the root cause, exploit mechanism, and heap manipulation techniques.
Classification
Working Poc | Writeup 100%
Target:
sudo 1.8.2-1.8.31p12, 1.9.0-1.9.5p1
No auth needed
Prerequisites:
Local access to a vulnerable sudo binary with SUID bit set
github
WORKING POC
8 stars
by codecat007 · cpoc
https://github.com/codecat007/cvehub/tree/main/linux/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). The exploit leverages a race condition to overwrite arbitrary files (e.g., /etc/passwd) for local privilege escalation.
Classification
Working Poc 100%
Target:
sudo (versions 1.8.21p2, 1.8.31, and others)
Auth required
Prerequisites:
knowledge of the user's password to modify /etc/passwd · tuning RACE_SLEEP_TIME for the target system
nomisec
WORKING POC
8 stars
by teamtopkarl · local
https://github.com/teamtopkarl/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit leverages environment variable manipulation to achieve local privilege escalation (LPE) to root by targeting specific sudo versions on Ubuntu and Debian.
Classification
Working Poc 100%
Target:
sudo 1.8.27, 1.8.31
No auth needed
Prerequisites:
Local access to a vulnerable system · Sudo installed and vulnerable to CVE-2021-3156
nomisec
WORKING POC
7 stars
by apogiatzis · poc
https://github.com/apogiatzis/docker-CVE-2021-3156
This repository provides a Docker-based environment for testing CVE-2021-3156, a heap-based buffer overflow in sudo. It includes scripts to compile and install vulnerable versions of sudo (1.8.31, 1.9.5, 1.9.5p1) for exploitation research.
Classification
Working Poc 90%
Target:
sudo versions 1.8.31, 1.9.5, 1.9.5p1
No auth needed
Prerequisites:
Docker environment · vulnerable sudo version
nomisec
WORKING POC
6 stars
by PurpleOzone · local
https://github.com/PurpleOzone/PE_CVE-CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156 (Baron Samedit), a heap-based buffer overflow in sudo. It includes compiled exploit code, post-exploitation scripts, and detailed technical explanations of the vulnerability mechanics.
Classification
Working Poc 95%
Target:
sudo (versions 1.8.2 to 1.8.31p2 and 1.9.0 to 1.9.5p1)
No auth needed
Prerequisites:
Access to a vulnerable system with sudo installed · Compilation tools (gcc, make)
nomisec
WORKING POC
6 stars
by Mhackiori · local
https://github.com/Mhackiori/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (version 1.8.27). The exploit leverages environment variable manipulation to corrupt heap memory and hijack the NSS library loading mechanism, achieving local privilege escalation (LPE) to root.
Classification
Working Poc 95%
Target:
sudo 1.8.27 (1.8.27-1+deb10u1)
No auth needed
Prerequisites:
Local access to a vulnerable sudo installation · Ability to execute sudoedit with crafted environment variables
nomisec
WORKING POC
6 stars
by Maalfer · local
https://github.com/Maalfer/Sudo-CVE-2021-3156
This exploit leverages a vulnerability in sudo (CVE-2025-32463) to achieve local privilege escalation by injecting a malicious shared library via the -R flag, bypassing security checks. The payload spawns a root shell or executes arbitrary commands.
Classification
Working Poc 95%
Target:
sudo (version not specified)
Auth required
Prerequisites:
Local access to a vulnerable system · gcc installed for compilation · sudo binary present
nomisec
SCANNER
5 stars
by yaunsky · poc
https://github.com/yaunsky/cve-2021-3156
This repository contains a detection script for CVE-2021-3156, a heap overflow vulnerability in sudo. The script checks for vulnerable sudo versions on Red Hat-based systems but does not include exploit code.
Classification
Scanner 100%
Target:
sudo versions 1.8.2 to 1.8.31p2 and 1.9.0 to 1.9.5p1
No auth needed
Prerequisites:
Access to a Red Hat-based system with sudo installed
nomisec
WORKING POC
5 stars
by 1N53C · local
https://github.com/1N53C/CVE-2021-3156-PoC
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). The exploit leverages environment variable manipulation to trigger the vulnerability and achieve local privilege escalation by executing a malicious shared library.
Classification
Working Poc 100%
Target:
sudo (versions 1.8.21, 1.8.27, 1.8.31)
No auth needed
Prerequisites:
Local access to a vulnerable system · Compilation of the exploit code
nomisec
WORKING POC
5 stars
by dinhbaouit · local
https://github.com/dinhbaouit/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit leverages a crafted environment variable to achieve local privilege escalation (LPE) by overwriting a service_user struct in the heap, ultimately spawning a root shell.
Classification
Working Poc 95%
Target:
sudo versions 1.8.2 to 1.8.31p2 and 1.9.0 to 1.9.5p1
No auth needed
Prerequisites:
Local access to the target system · Vulnerable sudo version installed
nomisec
WORKING POC
4 stars
by lmol · local
https://github.com/lmol/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). The exploit leverages heap grooming (feng shui) to manipulate memory layout and achieve arbitrary code execution via a malicious shared library loaded by sudo.
Classification
Working Poc 95%
Target:
sudo versions 1.8.2 to 1.8.31p2 and 1.9.0 to 1.9.5p1
No auth needed
Prerequisites:
Vulnerable sudo version · glibc with tcache · Python3 and gdb for exploit generation
nomisec
WRITEUP
4 stars
by baka9moe · poc
https://github.com/baka9moe/CVE-2021-3156-Exp
The repository provides a detailed technical analysis of CVE-2021-3156, a heap-based buffer overflow in Sudo, including root cause analysis and exploit mechanics. However, the provided Python script is incomplete and lacks functional exploit code.
Classification
Writeup 90%
Target:
Sudo (1.8.2 to 1.8.31p2 and 1.9.0 to 1.9.5p1)
No auth needed
Prerequisites:
Local access to the target system · Sudo version vulnerable to CVE-2021-3156
nomisec
SCANNER
3 stars
by ph4ntonn · local
https://github.com/ph4ntonn/CVE-2021-3156
The repository provides a detection command for CVE-2021-3156, a heap-based buffer overflow in Sudo, but lacks functional exploit code. It includes a test command to trigger the vulnerability and references Qualys' analysis.
Classification
Scanner 90%
Target:
Sudo (1.8.2 to 1.8.31p2, 1.9.0 to 1.9.5p1)
Auth required
Prerequisites:
Access to a vulnerable Sudo installation · Local user privileges
nomisec
WORKING POC
3 stars
by elbee-cyber · poc
https://github.com/elbee-cyber/CVE-2021-3156-PATCHER
This repository contains a bash script that automates the patching of CVE-2021-3156, a sudo heap overflow vulnerability, by compiling and installing a patched version of sudo (1.9.5p2). The script verifies the installation and cleans up temporary files.
Classification
Working Poc 90%
Target:
sudo versions prior to 1.9.5p2
Auth required
Prerequisites:
sudo access to install software · bash environment · network access to download sudo source
nomisec
WORKING POC
3 stars
by kal1gh0st · local
https://github.com/kal1gh0st/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in Sudo before 1.9.5p2. The exploit leverages a race condition via 'sudoedit -s' to achieve local privilege escalation to root.
Classification
Working Poc 95%
Target:
Sudo before 1.9.5p2
No auth needed
Prerequisites:
Local access to a vulnerable system · Sudo installed and configured
nomisec
WRITEUP
2 stars
by ypl6 · poc
https://github.com/ypl6/heaplens
This repository provides a GDB plugin called Heaplens for analyzing heap allocations in vulnerable sudo versions (CVE-2021-3156). It includes tools for tracking heap chunks, dumping logs, and inspecting memory layouts, but does not contain an actual exploit.
Classification
Writeup 90%
Target:
sudo 1.8.31
No auth needed
Prerequisites:
Debugging symbols enabled in sudo binary · GDB with GEF plugin
nomisec
WORKING POC
2 stars
by Q4n · local
https://github.com/Q4n/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit leverages heap manipulation to achieve local privilege escalation by injecting a malicious shared library via the `nss_load_library` mechanism.
Classification
Working Poc 95%
Target:
sudo 1.8.31
No auth needed
Prerequisites:
Access to a vulnerable system with sudo installed · Ability to compile and execute the exploit
nomisec
WORKING POC
2 stars
by musergi · local
https://github.com/musergi/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit leverages the `sudoedit` command with crafted arguments to trigger the vulnerability, leading to arbitrary code execution.
Classification
Working Poc 100%
Target:
sudo versions 1.8.2 to 1.8.31p2 and 1.9.0 to 1.9.5p1
No auth needed
Prerequisites:
Access to a system with vulnerable sudo version · Ability to execute sudoedit command
nomisec
STUB
1 stars
by BearCat4 · poc
https://github.com/BearCat4/CVE-2021-3156
The repository contains only a minimal README with the CVE identifier and no functional exploit code or technical details. It appears to be a placeholder or incomplete submission.
Target:
unknown
No auth needed
nomisec
SUSPICIOUS
1 stars
by binw2018 · poc
https://github.com/binw2018/CVE-2021-3156-SCRIPT
The repository claims to be a PoC for CVE-2021-3156 but only contains a script that downloads and installs a patched version of sudo. No exploit code is present, and the README instructs users to clone and run the script without technical details.
Classification
Suspicious 90%
Target:
sudo
Auth required
Prerequisites:
access to a vulnerable system
nomisec
SCANNER
1 stars
by nobodyatall648 · poc
https://github.com/nobodyatall648/CVE-2021-3156
The repository contains a Python script to check for CVE-2021-3156 vulnerability in sudo by triggering a heap-based buffer overflow via 'sudoedit -s' with a crafted argument. It also includes a shell script to patch the vulnerability by installing a fixed version of sudo.
Classification
Scanner 90%
Target:
sudo before 1.9.5p2
No auth needed
Prerequisites:
Access to a system with vulnerable sudo version
nomisec
WORKING POC
1 stars
by q77190858 · local
https://github.com/q77190858/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). The exploit leverages heap feng shui to overwrite the service_user struct and execute arbitrary shellcode, resulting in a root shell.
Classification
Working Poc 100%
Target:
sudo 1.8.31
No auth needed
Prerequisites:
Vulnerable sudo version (1.8.31) · Access to a system with the vulnerable sudo binary
nomisec
WORKING POC
1 stars
by DASICS-ICT · local
https://github.com/DASICS-ICT/DASICS-CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). The exploit leverages heap manipulation to achieve local privilege escalation (LPE) by overwriting the service_user struct and executing shellcode via a malicious shared library.
Classification
Working Poc 95%
Target:
sudo 1.8.31
No auth needed
Prerequisites:
Vulnerable sudo version (1.8.31) · Ability to execute sudoedit · RISC-V environment (as per the provided Makefile)
nomisec
SCANNER
1 stars
by RodricBr · local
https://github.com/RodricBr/CVE-2021-3156
This repository contains a bash script that checks the version of sudo to determine if it is vulnerable to CVE-2021-3156 (a heap-based buffer overflow in sudo). It does not exploit the vulnerability but scans for its presence.
Classification
Scanner 90%
Target:
sudo versions before 1.9.5p2
No auth needed
Prerequisites:
sudo installed on the target system
nomisec
SCANNER
1 stars
by lypd0 · poc
https://github.com/lypd0/CVE-2021-3156-checker
This repository contains a Python script that checks the installed version of sudo against a list of known vulnerable versions for CVE-2021-3156 (Baron Samedit). It does not exploit the vulnerability but only detects if the system is vulnerable.
Classification
Scanner 100%
Target:
sudo versions 1.9.5p1 and below (excluding 1.9.5p2)
No auth needed
Prerequisites:
sudo installed and accessible
nomisec
WORKING POC
1 stars
by donghyunlee00 · local
https://github.com/donghyunlee00/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). The exploit leverages heap manipulation to overwrite a service_user struct and execute arbitrary shellcode, resulting in a root shell.
Classification
Working Poc 100%
Target:
sudo 1.8.31
No auth needed
Prerequisites:
Vulnerable sudo version (1.8.31) · Access to a system with sudoedit
nomisec
WORKING POC
1 stars
by TheFlash2k · local
https://github.com/TheFlash2k/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). The exploit leverages environment variable manipulation and a crafted payload to achieve local privilege escalation (LPE) to root.
Classification
Working Poc 95%
Target:
sudo (versions before 1.9.5p2)
No auth needed
Prerequisites:
Local access to a vulnerable system · sudo installed and vulnerable
nomisec
WORKING POC
1 stars
by unauth401 · poc
https://github.com/unauth401/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit uses a constructor function to execute shellcode that escalates privileges to root and spawns a shell.
Classification
Working Poc 95%
Target:
sudo (versions before 1.9.5p2)
No auth needed
Prerequisites:
Vulnerable sudo version · Local access to the target system
nomisec
WORKING POC
1 stars
by 0x7183 · local
https://github.com/0x7183/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156 (Baron Samedit), a heap-based buffer overflow in sudo. It includes a Python exploit script, a malicious shared library for spawning a root shell, and a Docker environment for testing.
Classification
Working Poc 95%
Target:
sudo 1.8.31
No auth needed
Prerequisites:
Vulnerable sudo version (1.8.31) · Compilation of the malicious shared library
nomisec
SCANNER
1 stars
by SantiagoSerrao · poc
https://github.com/SantiagoSerrao/ScannerCVE-2021-3156
The repository contains a Python script that scans multiple hosts for CVE-2021-3156 (sudo heap-based buffer overflow) by attempting to execute 'sudoedit -s /' via SSH. It checks for a specific error message to determine vulnerability but does not exploit it for RCE.
Classification
Scanner 90%
Target:
sudo (versions before 1.9.5p2)
Auth required
Prerequisites:
SSH access with valid credentials · List of target IPs
nomisec
WORKING POC
by hycheng15 · local
https://github.com/hycheng15/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit leverages heap manipulation to overwrite a service_user struct and execute arbitrary shellcode, resulting in a root shell.
Classification
Working Poc 95%
Target:
sudo (versions before 1.9.5p2)
No auth needed
Prerequisites:
Presence of vulnerable sudo version · Ability to execute sudoedit on the target system
nomisec
WRITEUP
by Shuhaib88 · local
https://github.com/Shuhaib88/Baron-Samedit-Heap-Buffer-Overflow-CVE-2021-3156
This repository provides a detailed technical analysis of CVE-2021-3156 (Baron Samedit), including vulnerability checks, root cause analysis, and exploitation methods. It includes PoC commands to test for the heap-based buffer overflow in sudo but does not contain functional exploit code.
Classification
Writeup 95%
Target:
sudo versions 1.8.2 to 1.8.31p2 and 1.9.0 to 1.9.5p1
No auth needed
Prerequisites:
Local access to a vulnerable system · Non-privileged user account
nomisec
WORKING POC
by Superliverbun · local
https://github.com/Superliverbun/cve-2021-3156-
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit leverages crafted environment variables and arguments to trigger the vulnerability, leading to privilege escalation via a malicious shared library loaded through sudoedit.
Classification
Working Poc 95%
Target:
sudo version 1.8.31
No auth needed
Prerequisites:
Access to a vulnerable sudo version · Ability to compile and execute the exploit on the target system
nomisec
WORKING POC
by mutur4 · local
https://github.com/mutur4/CVE-2021-3156
This exploit leverages a heap-based buffer overflow in sudo (CVE-2021-3156) to achieve local privilege escalation by manipulating environment variables and overflowing into adjacent heap structures. It targets sudoedit with crafted arguments to trigger the vulnerability and execute arbitrary commands.
Classification
Working Poc 95%
Target:
sudo 1.8.31p2
No auth needed
Prerequisites:
Access to a vulnerable sudo version (1.8.31p2) · Ability to execute sudoedit on the target system
nomisec
WORKING POC
by HuzaifaTariqAfzalKhan · local
https://github.com/HuzaifaTariqAfzalKhan/CVE-Exploit-Research-Development-ITSOLERA
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (version 1.8.31 on Ubuntu 20.04). The exploit leverages the vulnerability to achieve local privilege escalation by crafting a malicious payload and executing it via sudoedit.
Classification
Working Poc 95%
Target:
sudo 1.8.31 on Ubuntu 20.04
No auth needed
Prerequisites:
Ubuntu 20.04 with sudo 1.8.31 · gcc, make, git installed · specific directory permissions
nomisec
SCANNER
by gmldbd94 · poc
https://github.com/gmldbd94/cve-2021-3156
This repository contains a detection script for CVE-2021-3156, a heap-based buffer overflow in sudo. The script checks installed sudo versions against a list of known vulnerable versions but does not include exploit code.
Classification
Scanner 100%
Target:
sudo (multiple versions)
No auth needed
Prerequisites:
Access to a system with vulnerable sudo version
nomisec
STUB
by DanielAzulayy · poc
https://github.com/DanielAzulayy/CTF-2021
This repository appears to be a CTF challenge setup rather than an exploit PoC for CVE-2021-3156. It includes Flask application code and configuration files but lacks any functional exploit code or technical analysis related to the vulnerability.
Target:
None
No auth needed
nomisec
WRITEUP
by ymrsmns · poc
https://github.com/ymrsmns/CVE-2021-3156
This repository provides an Ansible role to patch CVE-2021-3156, a heap-based buffer overflow in sudo before 1.9.5p2. It includes tasks to update sudo via yum and verify version changes, but does not contain exploit code.
Classification
Writeup 90%
Target:
sudo before 1.9.5p2
Auth required
Prerequisites:
Access to a vulnerable system with sudo installed · Permissions to run yum/update commands
nomisec
WORKING POC
by asepsaepdin · local
https://github.com/asepsaepdin/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo that allows local privilege escalation to root. The exploit leverages heap manipulation and shellcode injection to achieve arbitrary code execution.
Classification
Working Poc 95%
Target:
sudo before 1.9.5p2
No auth needed
Prerequisites:
Local access to a vulnerable system · sudo installed and configured
nomisec
WORKING POC
by wurwur · local
https://github.com/wurwur/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo that allows local privilege escalation. The exploit includes a Python script that manipulates heap memory to achieve root access and a PHP backdoor for persistence.
Classification
Working Poc 95%
Target:
sudo versions 1.8.2 to 1.8.31p2 and 1.9.0 to 1.9.5p1
No auth needed
Prerequisites:
Local access to a vulnerable system · sudo binary must be present and vulnerable
nomisec
WORKING POC
by Bad3r · local
https://github.com/Bad3r/CVE-2021-3156-without-ip-command
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit leverages the vulnerability to achieve local privilege escalation by manipulating environment variables and heap memory structures. It is modified to use 'ifconfig' instead of the 'ip' command for broader compatibility.
Classification
Working Poc 95%
Target:
sudo versions before 1.9.5p2
No auth needed
Prerequisites:
glibc with tcache · nscd service not running · vulnerable sudo version
nomisec
WORKING POC
by Sebastianbedoya25 · local
https://github.com/Sebastianbedoya25/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). The exploit leverages heap Feng-Shui techniques to manipulate memory layout and achieve privilege escalation via a crafted environment variable and shellcode injection.
Classification
Working Poc 95%
Target:
sudo (versions 1.8.2 to 1.8.31p2, 1.9.0 to 1.9.5p1)
No auth needed
Prerequisites:
Local access to the target system · Vulnerable sudo version installed
nomisec
WORKING POC
by ten-ops · local
https://github.com/ten-ops/baron-samedit
This repository contains a functional exploit for CVE-2021-3156 (Baron Samedit), a heap-based buffer overflow in sudo's sudoedit functionality. The exploit leverages crafted environment variables and command-line arguments to achieve local privilege escalation on vulnerable systems.
Classification
Working Poc 95%
Target:
sudo 1.8.31 (with glibc 2.31 on Ubuntu 20.04)
No auth needed
Prerequisites:
sudo version 1.8.31 (unpatched) · Ubuntu 20.04 with glibc 2.31 · Local user access
nomisec
WORKING POC
by Sornphut · local
https://github.com/Sornphut/CVE-2021-3156-Heap-Based-Buffer-Overflow-in-Sudo-Baron-Samedit-
This is a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). It leverages a race condition and environment variable manipulation to overwrite arbitrary files, achieving local privilege escalation.
Classification
Working Poc 95%
Target:
sudo (versions 1.8.2 to 1.8.31p2, 1.9.0 to 1.9.5p1)
No auth needed
Prerequisites:
Local access to the target system · sudo must be installed and configured · Ability to execute binaries
nomisec
WORKING POC
by czeti · poc
https://github.com/czeti/baron-samedit
This repository contains a functional exploit for CVE-2021-3156 (Baron Samedit), a heap-based buffer overflow in sudo's sudoedit functionality. The exploit leverages crafted environment variables and shellcode to achieve local privilege escalation on vulnerable systems.
Classification
Working Poc 95%
Target:
sudo 1.8.31
No auth needed
Prerequisites:
sudo version 1.8.31 · glibc 2.31 · Ubuntu 20.04
nomisec
WORKING POC
by arvindshima · local
https://github.com/arvindshima/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). The exploit leverages heap manipulation to overwrite a service_user struct and execute shellcode, resulting in local privilege escalation to root.
Classification
Working Poc 100%
Target:
sudo 1.8.31
No auth needed
Prerequisites:
Access to a vulnerable system with sudo 1.8.31 · Ability to compile and execute the exploit
nomisec
SCANNER
by VilmarTuminskii · poc
https://github.com/VilmarTuminskii/cve-2021-3156-sudo-lab
This repository contains Python scripts to detect vulnerable versions of sudo (CVE-2021-3156) and analyze privilege contexts, but does not include functional exploit code. It focuses on vulnerability detection and mitigation guidance.
Classification
Scanner 90%
Target:
sudo versions 1.8.2 to 1.9.5
No auth needed
Prerequisites:
Local access to a vulnerable system
nomisec
WORKING POC
by sharkmoos · local
https://github.com/sharkmoos/Baron-Samedit
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit leverages environment variable manipulation and a crafted shared object to achieve privilege escalation.
Classification
Working Poc 100%
Target:
sudo versions 1.8.2 to 1.8.31p2 and 1.9.0 to 1.9.5p1
No auth needed
Prerequisites:
Access to a vulnerable sudo binary · Ability to execute commands on the target system
nomisec
WORKING POC
by CyberCommands · local
https://github.com/CyberCommands/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo before 1.9.5p2. The exploit leverages the vulnerability to achieve local privilege escalation (LPE) to root by manipulating environment variables and heap memory to overwrite a service_user struct, leading to the execution of arbitrary shellcode.
Classification
Working Poc 100%
Target:
sudo before 1.9.5p2
No auth needed
Prerequisites:
Vulnerable sudo version (before 1.9.5p2) · Local access to the target system
nomisec
WORKING POC
by capturingcats · local
https://github.com/capturingcats/CVE-2021-3156
This is a functional exploit for CVE-2021-3156 (Baron Samedit), a heap-based buffer overflow in sudo. It leverages a race condition to overwrite arbitrary files (e.g., /etc/passwd) via sudoedit, achieving local privilege escalation.
Classification
Working Poc 95%
Target:
sudo (versions before 1.9.5p2)
No auth needed
Prerequisites:
Local access to a vulnerable system · Ability to execute binaries · Tuning of RACE_SLEEP_TIME for reliability
nomisec
WORKING POC
by freeFV · poc
https://github.com/freeFV/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo that allows local privilege escalation. It includes both a PoC script and a remediation script for upgrading sudo.
Classification
Working Poc 90%
Target:
sudo versions 1.8.2 to 1.8.31p2 and 1.9.0 to 1.9.5p1
No auth needed
Prerequisites:
Local access to a vulnerable system
nomisec
WORKING POC
by oneoy · local
https://github.com/oneoy/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156 (Baron Samedit), a heap-based overflow in sudo. It includes a Makefile, exploit code (hax.c), and a brute-force script (brute.sh) to find working parameters for different targets.
Classification
Working Poc 100%
Target:
sudo (versions 1.8.21, 1.8.27, 1.8.31)
No auth needed
Prerequisites:
Access to a vulnerable sudo binary · Ability to execute commands on the target system
gitlab
WORKING POC
by kal1gh0st · local
https://gitlab.com/kal1gh0st/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in Sudo before 1.9.5p2. The exploit leverages a race condition via 'sudoedit -s' with a crafted command-line argument to achieve local privilege escalation to root.
Classification
Working Poc 95%
Target:
Sudo before 1.9.5p2
No auth needed
Prerequisites:
Local access to a vulnerable system · Ability to execute sudoedit
nomisec
WORKING POC
by Exodusro · poc
https://github.com/Exodusro/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156 (Baron Samedit), a heap-based buffer overflow in sudo. The exploit includes pre-configured targets for specific Linux distributions and versions, as well as a brute-force script to identify working parameters for other systems.
Classification
Working Poc 95%
Target:
sudo (versions 1.8.21, 1.8.27, 1.8.31)
No auth needed
Prerequisites:
Access to a vulnerable system with sudo installed · Ability to execute binaries
nomisec
WORKING POC
by halissha · poc
https://github.com/halissha/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). The exploit leverages environment variable manipulation to achieve local privilege escalation (LPE) by overwriting a service_user struct in the heap, leading to arbitrary command execution as root.
Classification
Working Poc 100%
Target:
sudo (versions 1.8.2 to 1.8.31p2, 1.9.0 to 1.9.5p1)
No auth needed
Prerequisites:
Local access to a vulnerable system · sudo must be installed and configured
gitlab
SCANNER
by olegfiksel · poc
https://gitlab.com/olegfiksel/ansible_check_cve-2021-3156_sudo_vulnerability
This repository contains an Ansible playbook to detect the presence of CVE-2021-3156 (Baron Samedit) by checking the sudo version and testing for vulnerable behavior using sudoedit. It does not exploit the vulnerability but scans for its presence.
Classification
Scanner 95%
Target:
sudo (versions before 1.9.5p2)
Auth required
Prerequisites:
sudo installed on the target system · ability to execute sudoedit command
gitlab
WORKING POC
by LongChampion · poc
https://gitlab.com/LongChampion/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit uses brute-force techniques to manipulate environment variables and trigger the vulnerability, leading to privilege escalation.
Classification
Working Poc 95%
Target:
sudo (versions before 1.9.5p2)
No auth needed
Prerequisites:
Access to a vulnerable sudo binary · Ability to execute the exploit on the target system
nomisec
WORKING POC
by TopskiyPavelQwertyGang · poc
https://github.com/TopskiyPavelQwertyGang/Review.CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156 (Baron Samedit), a heap-based buffer overflow in sudo that allows local privilege escalation to root. The exploit leverages the NSS (Name Service Switch) module to overwrite the service_user struct and bypass ASLR.
Classification
Working Poc 95%
Target:
sudo versions < 1.9.5p2
Auth required
Prerequisites:
Local access to the target system · Vulnerable sudo version (< 1.9.5p2) · glibc with tcache (>= 2.26) · nscd service not running
nomisec
WRITEUP
by perlun · poc
https://github.com/perlun/sudo-1.8.3p1-patched
This repository contains patched source code for sudo, including patches for various CVEs, but does not include functional exploit code for CVE-2021-3156. It appears to be a collection of historical patches and source files rather than an exploit PoC.
Classification
Writeup 90%
Target:
sudo 1.8.3p1
No auth needed
nomisec
STUB
by ret2basic · poc
https://github.com/ret2basic/SudoScience
The repository contains only a minimal README with a title and CVE reference, lacking any exploit code, technical analysis, or substantive content. It appears to be a placeholder or incomplete project.
Target:
sudo (unspecified version)
No auth needed
nomisec
STUB
by ajtech-hue · poc
https://github.com/ajtech-hue/CVE-2021-3156-Mitigation-ShellScript-Build
This repository contains incomplete and non-functional shell scripts intended to mitigate CVE-2021-3156 (sudo heap-based buffer overflow) by checking for 'sudoedit' process execution and enforcing password authentication. However, the scripts are poorly written, contain syntax errors, and do not provide a functional exploit or mitigation.
Target:
sudo (versions affected by CVE-2021-3156)
Auth required
Prerequisites:
sudoedit process execution
nomisec
WRITEUP
by Ashish-dawani · poc
https://github.com/Ashish-dawani/CVE-2021-3156-Patch
This repository provides a patch script for CVE-2021-3156, a heap overflow vulnerability in sudo. The script automates the process of downloading, compiling, and installing a patched version of sudo (1.9.5p2).
Classification
Writeup 90%
Target:
sudo versions prior to 1.9.5p2
Auth required
Prerequisites:
sudo access to install the patched version · internet connectivity to download the patched source
nomisec
WORKING POC
by DDayLuong · local
https://github.com/DDayLuong/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit leverages environment variable manipulation to trigger the vulnerability and achieve local privilege escalation (LPE) by executing a malicious shared library.
Classification
Working Poc 100%
Target:
sudo (versions 1.8.21, 1.8.27, 1.8.31)
No auth needed
Prerequisites:
Local access to the target system · Presence of vulnerable sudo version
nomisec
WORKING POC
by shishirpandey18 · local
https://github.com/shishirpandey18/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit leverages environment variable manipulation and crafted arguments to trigger the vulnerability, leading to privilege escalation via a malicious shared library loaded as a constructor.
Classification
Working Poc 95%
Target:
sudo 1.8.31 (Ubuntu 20.04.1)
No auth needed
Prerequisites:
Access to a vulnerable system with sudo 1.8.31 · Ability to compile and execute the exploit
exploitdb
WORKING POC
by nu11secur1ty · clocalmultiple
https://www.exploit-db.com/exploits/49522
This exploit leverages a heap-based buffer overflow in sudo (CVE-2021-3156) to achieve local privilege escalation by overwriting arbitrary files via a race condition in sudoedit. It uses environment variable manipulation and symlink attacks to trigger the vulnerability.
Classification
Working Poc 95%
Target:
sudo 1.9.5p1 and earlier
No auth needed
Prerequisites:
Local access to a vulnerable system · sudoedit must be present · Race condition timing may require tuning
exploitdb
WORKING POC
by West Shepherd · pythonlocalmultiple
https://www.exploit-db.com/exploits/49521
This exploit leverages a heap-based buffer overflow in sudo (CVE-2021-3156) to achieve local privilege escalation by overwriting critical files like /etc/passwd. It uses a race condition and environment variable manipulation to trigger the vulnerability.
Classification
Working Poc 95%
Target:
Sudo versions 1.8.2 to 1.8.31p2 and 1.9.0 to 1.9.5p1
No auth needed
Prerequisites:
Local access to the target system · Sudo binary vulnerable to CVE-2021-3156 · Ability to execute sudoedit
vulncheck_xdb
WORKING POC
local
https://github.com/Jauler/cve2021-3156-sudo-heap-overflow
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit leverages a malicious shared library and crafted environment variables to achieve local privilege escalation on vulnerable Debian 10 systems.
Classification
Working Poc 95%
Target:
sudo (versions before 1.9.5p2)
No auth needed
Prerequisites:
Vulnerable sudo version · Ability to compile and execute code on the target system
vulncheck_xdb
WORKING POC
local
https://github.com/barebackbandit/CVE-2021-3156
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo. The exploit crafts a malicious payload to trigger the overflow and achieve privilege escalation by manipulating environment variables and command-line arguments.
Classification
Working Poc 95%
Target:
sudo (versions before 1.9.5p2)
No auth needed
Prerequisites:
Access to a vulnerable sudo binary · Ability to execute sudoedit
vulncheck_xdb
WORKING POC
local
https://github.com/puckiestyle/CVE-2021-3156
This repository contains multiple functional exploits for CVE-2021-3156 (Sudo Baron Samedit), a heap-based buffer overflow vulnerability in sudo. The exploits target various Linux distributions and glibc configurations, leveraging techniques such as tcache manipulation, struct overwrites, and race conditions to achieve privilege escalation.
Classification
Working Poc 100%
Target:
sudo versions 1.8.9-1.8.23
No auth needed
Prerequisites:
Linux x64 system with vulnerable sudo version · Specific glibc configurations depending on the exploit variant
metasploit
WORKING POC
EXCELLENT
by Qualys, Spencer McIntyre, bwatters-r7, smashery, blasty <[email protected]>, worawit, Alexander Krog ·
rubypoc
https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/local/sudo_baron_samedit.rb
This Metasploit module exploits a heap-based buffer overflow in sudo (CVE-2021-3156) to achieve local privilege escalation by overwriting a service_user struct to load an attacker-controlled library with elevated privileges.
Classification
Working Poc 100%
Target:
sudo versions 1.8.2 through 1.8.31p2 and 1.9.0 through 1.9.5p1
No auth needed
Prerequisites:
Local access to a vulnerable system · Write permissions in a directory (e.g., /tmp)