{"id":"CVE-2021-3156","kind":"vulnerability","aliases":["CVE-2021-3156"],"related":[],"title":"Sudo Sudo: Sudo Heap-Based Buffer Overflow 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.","summary":"Sudo has a heap-based buffer overflow caused by an off-by-one error, known as Baron Samedit. A local user without sudo rights can gain root privileges on the affected machine.","severity":"high","cvss":7.8,"epss":0.99962,"exploited":true,"exploited_at":"2022-04-06T00:00:00+00:00","products":[{"name":"Sudo Sudo","fixed":[],"affected":"","ecosystem":"vendor"}],"ecosystems":["vendor"],"tags":["exploited","infrastructure","linux","self-hosted","servers","sudo"],"not_affected_if":["unknown"],"how_to_check":"Run 'sudo -V' and compare the version with the fixed releases; on Linux, check the package manager for the sudo package version.","fix":"Update sudo to a fixed release per the vendor instructions (CISA KEV required action: apply updates per vendor instructions).","status":"open","published_at":"2021-01-26T21:15:12+00:00","first_seen_at":"2026-10-23T19:11:52+00:00","triaged_at":"2026-10-23T21:18:05+00:00","updated_at":"2026-10-23T21:57:35+00:00","category":"infrastructure","confidence":0.8,"triage":{"at":"2026-10-23T21:18:05Z","model":"claude-haiku-5-5","output":{"fix":"Update sudo to a fixed release per the vendor instructions (CISA KEV required action: apply updates per vendor instructions).","reach":"local","impact":"high","summary":"Sudo has a heap-based buffer overflow caused by an off-by-one error, known as Baron Samedit. A local user without sudo rights can gain root privileges on the affected machine.","category":"infrastructure","who_cares":["linux","sudo","self-hosted","servers"],"confidence":0.8,"needs_auth":"yes","worst_case":"Local unprivileged user gains root on the machine","analyst_note":"Sources do not list affected or fixed versions; confirm exact vulnerable sudo version ranges and fixed releases from the vendor advisory and the KEV entry.","how_to_check":"Run 'sudo -V' and compare the version with the fixed releases; on Linux, check the package manager for the sudo package version.","needs_analyst":true,"not_affected_if":["unknown"],"user_interaction":"no","needs_special_setup":"no","severity_if_unknown":"high"},"cost_usd":0.000466,"input_tokens":2820,"output_tokens":368,"severity_before":"unknown"},"analyst_status":null,"analyst_note":null,"search":"'-2021':11A,14A '-3156':12A,15A '1.9.5':62C 'affect':58B 'allow':82C 'argument':95C 'backslash':101C 'baron':44B 'base':6A,31B,78C 'buffer':7A,32B,79C 'caus':34B 'charact':102C 'command':93C 'command-lin':92C 'contain':64C 'cve':10A,13A 'end':97C 'error':41B,70C 'escal':84C 'exploit':18B 'gain':53B 'heap':5A,30B,77C 'heap-bas':4A,29B,76C 'host':23B 'infrastructur':19B 'known':42B 'line':94C 'linux':20B 'local':47B 'machin':59B 'off-by-on':37B,66C 'one':40B,69C 'overflow':8A,33B,80C 'p2':63C 'privileg':55B,83C 'result':73C 'right':51B 'root':54B,86C 'samedit':45B 'self':22B 'self-host':21B 'server':24B 'singl':100C 'sudo':1A,2A,3A,16A,17A,25B,26B,50B,60C 'sudoedit':88C 'user':48B 'via':87C 'vulner':9A 'without':49B","nicknames":[],"mitigations":[],"who_affected":null,"tier":null,"verified":{},"analyst_revisit_at":null,"first_public_at":"2021-01-26T21:15:12+00:00","kev":{"dateAdded":"2022-04-06","dueDate":"2022-04-27","requiredAction":"Apply updates per vendor instructions.","knownRansomwareCampaignUse":"Unknown"},"cvss_vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","cvss_by":"nvd@nist.gov","poc_count":0,"sources":[{"source":"kev","external_id":"CVE-2021-3156","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?search_api_fulltext=CVE-2021-3156","severity":null,"published_at":"2022-04-06T00:00:00+00:00","modified_at":null,"first_seen_at":"2026-10-23T19:11:52+00:00","fetched_at":"2026-10-25T14:39:40+00:00","note":null},{"source":"epss","external_id":"CVE-2021-3156","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-3156","severity":null,"published_at":null,"modified_at":null,"first_seen_at":"2026-10-23T19:13:44+00:00","fetched_at":"2026-10-23T19:13:44+00:00","note":null},{"source":"nvd","external_id":"CVE-2021-3156","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-3156","severity":null,"published_at":"2021-01-26T21:15:12+00:00","modified_at":"2026-06-17T04:04:45+00:00","first_seen_at":"2026-10-23T21:57:35+00:00","fetched_at":"2026-10-23T21:57:35+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}