Exploitation Summary
CVE-2021-3156 is actively exploited and listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, added April 6, 2022.
EIP tracks 97 public exploits from researchers including nu11secur1ty, West Shepherd, blasty, including a Metasploit module exploits/linux/local/sudo_baron_samedit.
A Nuclei detection template is also available.
AI-analyzed exploit summary 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.
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.
Exploits (97)
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.
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.
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.
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.
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()`.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
This repository contains a detailed technical analysis of CVE-2021-3156, a heap-based buffer overflow in sudo leading to local privilege escalation. It includes fuzzing methodology, root cause analysis, and exploit strategy but does not provide functional exploit code.
The repository contains only a README with a brief description of CVE-2021-3156 but no exploit code, technical analysis, or functional PoC. It appears to be a placeholder or incomplete study.
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.
The repository contains only a Dockerfile, Makefile, and a minimal README with no actual exploit code or technical details about CVE-2021-3156. It appears to be a placeholder for setting up a development environment.
This repository provides a detailed technical writeup on CVE-2021-3156 (Baron Samedit), a heap-based buffer overflow in sudo leading to local privilege escalation. It includes lab setup, exploitation steps, and mitigation strategies but lacks actual exploit code.
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). The exploit leverages a crafted environment and command-line arguments to overwrite a service_user struct, leading to arbitrary code execution as root via a malicious shared library.
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.
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.
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.
This repository contains a functional exploit for CVE-2021-3156, a heap-based buffer overflow in sudo (Baron Samedit). The exploit leverages heap manipulation and environment variable overflow to achieve local privilege escalation (LPE) to root.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 uses heap feng shui techniques to manipulate memory allocation and overwrite critical structures, ultimately executing shellcode to spawn a root shell.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
Nuclei Templates (1)
References (35)
Scores
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H