{"answers":{"affected":"It affects 24 products.","exploited":"Yes. Attackers have exploited CVE-2021-3156 in the wild since at least 6 Apr 2022.","fix":"Apply the vendor's patch. US federal agencies must fix it by 27 Apr 2022.","what":"CVE-2021-3156 (Baron Samedit) is a high-severity memory corruption vulnerability in Debian Debian Linux, published on 26 Jan 2021. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-3156 (Baron Samedit) and fix it if it is affected.\n\nWhat it is: CVE-2021-3156 (Baron Samedit) is a high-severity memory corruption vulnerability in Debian Debian Linux, published on 26 Jan 2021. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: Yes. Attackers have exploited CVE-2021-3156 in the wild since at least 6 Apr 2022.\n\nAffected product: Debian Debian Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-3156/ (Markdown: https://insights.sbomify.com/CVE-2021-3156/index.md)","id":"CVE-2021-3156","markdown":"https://insights.sbomify.com/CVE-2021-3156/index.md","name":"CVE-2021-3156 (Baron Samedit)","record":{"aliases":["ALPINE-CVE-2021-3156","CLSA-2021-1611743864","CLSA-2021-1634925665","DEBIAN-CVE-2021-3156","DLA-2534-1","DSA-4839-1","GHSA-w5vh-2923-gp5c","MGASA-2021-0056","RHSA-2021:0218","RHSA-2021:0219","RHSA-2021:0220","RHSA-2021:0221","RHSA-2021:0222","RHSA-2021:0223","RHSA-2021:0224","RHSA-2021:0225","RHSA-2021:0226","RHSA-2021:0227","SUSE-SU-2021:0928-1","SUSE-SU-2021:1267-1","SUSE-SU-2021:1273-1","SUSE-SU-2021:1274-1","SUSE-SU-2021:1275-1","SUSE-SU-2024:4389-1","UBUNTU-CVE-2021-3156","USN-4705-2","openSUSE-SU-2021:0602-1"],"analysis":{"component_type":"operating_system","fix_type":"patch","impacts":["privilege_escalation"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Sudo utility","requires_auth":"low_privilege","summary":"A heap-based buffer overflow in Sudo allows local attackers to escalate privileges to root via a crafted command-line argument.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"privilege_management_for_mac","vendor":"beyondtrust"},{"product":"privilege_management_for_unix\\/linux","vendor":"beyondtrust"},{"product":"debian_linux","vendor":"debian"},{"product":"fedora","vendor":"fedoraproject"},{"product":"web_gateway","vendor":"mcafee"},{"product":"active_iq_unified_manager","vendor":"netapp"},{"product":"cloud_backup","vendor":"netapp"},{"product":"hci_management_node","vendor":"netapp"},{"product":"oncommand_unified_manager_core_package","vendor":"netapp"},{"product":"ontap_select_deploy_administration_utility","vendor":"netapp"},{"product":"ontap_tools","vendor":"netapp"},{"product":"solidfire","vendor":"netapp"},{"product":"communications_performance_intelligence_center","vendor":"oracle"},{"product":"micros_compact_workstation_3_firmware","vendor":"oracle"},{"product":"micros_es400_firmware","vendor":"oracle"},{"product":"micros_kitchen_display_system_firmware","vendor":"oracle"},{"product":"micros_workstation_5a_firmware","vendor":"oracle"},{"product":"micros_workstation_6_firmware","vendor":"oracle"},{"product":"tekelec_platform_distribution","vendor":"oracle"},{"product":"sudo","vendor":"sudo_project"},{"product":"diskstation_manager","vendor":"synology"},{"product":"diskstation_manager_unified_controller","vendor":"synology"},{"product":"skynas_firmware","vendor":"synology"},{"product":"vs960hd_firmware","vendor":"synology"}],"cvss":{"score":7.8,"severity":"high","source":"cisa-adp","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-193","name":"Off-by-one Error"}],"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.","ecosystems":["Red Hat:enterprise_linux:7::client","Red Hat:enterprise_linux:7::computenode","Red Hat:enterprise_linux:7::server","Red Hat:enterprise_linux:7::workstation","Red Hat:enterprise_linux:8::baseos","Red Hat:rhel_aus:7.2::server","Red Hat:rhel_aus:7.3::server","Red Hat:rhel_aus:7.4::server","Red Hat:rhel_e4s:7.4::server","Red Hat:rhel_els:6","Red Hat:rhel_eus:7.6::computenode","Red Hat:rhel_eus:7.6::server","Red Hat:rhel_eus:7.7::computenode","Red Hat:rhel_eus:7.7::server","Red Hat:rhel_eus:8.1::baseos","Red Hat:rhel_eus:8.2::baseos","Red Hat:rhel_tus:7.4::server","SUSE:Enterprise Storage 6","SUSE:HPE Helion OpenStack 8","SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS","SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS","SUSE:Linux Enterprise High Performance Computing 15-ESPOS","SUSE:Linux Enterprise High Performance Computing 15-LTSS","SUSE:Linux Enterprise Micro 5.0","SUSE:Linux Enterprise Module for Basesystem 15 SP2","SUSE:Linux Enterprise Server 12 SP2-BCL","SUSE:Linux Enterprise Server 12 SP2-LTSS","SUSE:Linux Enterprise Server 12 SP3-BCL","SUSE:Linux Enterprise Server 12 SP3-LTSS","SUSE:Linux Enterprise Server 12 SP4-LTSS","SUSE:Linux Enterprise Server 12 SP5","SUSE:Linux Enterprise Server 12 SP5-LTSS","SUSE:Linux Enterprise Server 15 SP1-BCL","SUSE:Linux Enterprise Server 15 SP1-LTSS","SUSE:Linux Enterprise Server 15-LTSS","SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5","SUSE:Linux Enterprise Server for SAP Applications 12 SP2","SUSE:Linux Enterprise Server for SAP Applications 12 SP3","SUSE:Linux Enterprise Server for SAP Applications 12 SP4","SUSE:Linux Enterprise Server for SAP Applications 12 SP5","SUSE:Linux Enterprise Server for SAP Applications 15","SUSE:Linux Enterprise Server for SAP Applications 15 SP1","SUSE:Linux Enterprise Software Development Kit 12 SP5","SUSE:Manager Proxy 4.0","SUSE:Manager Retail Branch Server 4.0","SUSE:Manager Server 4.0","SUSE:OpenStack Cloud 7","SUSE:OpenStack Cloud 8","SUSE:OpenStack Cloud 9","SUSE:OpenStack Cloud Crowbar 8","SUSE:OpenStack Cloud Crowbar 9","openSUSE:Leap 15.2"],"exploits":{"exploitdb":2,"first_seen":"2021-01-26","github_poc":88,"max_poc_stars":1030,"metasploit":1,"nuclei":0,"refs":[{"date":"2021-01-30T20:39:58Z","kind":"github_poc","ref":"https://github.com/blasty/CVE-2021-3156","stars":1030,"title":null},{"date":"2021-03-15T17:37:02Z","kind":"github_poc","ref":"https://github.com/worawit/CVE-2021-3156","stars":810,"title":"Sudo Baron Samedit Exploit"},{"date":"2021-01-30T03:22:04Z","kind":"github_poc","ref":"https://github.com/stong/CVE-2021-3156","stars":430,"title":"PoC for CVE-2021-3156 (sudo heap overflow)"},{"date":"2021-04-29T06:29:26Z","kind":"github_poc","ref":"https://github.com/LiveOverflow/pwnedit","stars":227,"title":"CVE-2021-3156 - Sudo Baron Samedit"},{"date":"2021-02-09T19:25:18Z","kind":"github_poc","ref":"https://github.com/Rvn0xsy/CVE-2021-3156-plus","stars":204,"title":"CVE-2021-3156非交互式执行命令"},{"date":"2021-02-03T19:57:56Z","kind":"github_poc","ref":"https://github.com/CptGibbon/CVE-2021-3156","stars":158,"title":"Root shell PoC for CVE-2021-3156"},{"date":"2021-01-27T16:03:34Z","kind":"github_poc","ref":"https://github.com/reverse-ex/CVE-2021-3156","stars":112,"title":"CVE-2021-3156"},{"date":"2022-11-28T12:52:11Z","kind":"github_poc","ref":"https://github.com/0x4ndy/clif","stars":100,"title":"clif 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."}],"tier":"exploited"},"has_fix":true,"headline":"Sudo Heap-Based Buffer Overflow","id":"CVE-2021-3156","indexable":true,"kev":{"dateAdded":"2022-04-06","dueDate":"2022-04-27","knownRansomwareCampaignUse":"Unknown","product":"Sudo","requiredAction":"Apply updates per vendor instructions.","vendorProject":"Sudo","vulnerabilityName":"Sudo Heap-Based Buffer Overflow Vulnerability"},"kind":"cve","links":{"ecosystem":null,"product":"debian:debian_linux","products":["debian:debian_linux","fedoraproject:fedora","netapp:active_iq_unified_manager","netapp:cloud_backup","netapp:hci_management_node","netapp:ontap_select_deploy_administration_utility","netapp:solidfire","synology:diskstation_manager"],"type":"memory_corruption","year":"2021"},"n_packages":86,"n_references":34,"next":{"headline":"Cross-site scripting in n/a","id":"CVE-2021-3159"},"packages":[{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["0:1.8.23-10.el7_9.1"],"introduced":["0"],"last_affected":[],"package":"sudo","purl":"pkg:rpm/redhat/sudo","source":"RHSA-2021:0221"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["0:1.8.23-10.el7_9.1"],"introduced":["0"],"last_affected":[],"package":"sudo-debuginfo","purl":"pkg:rpm/redhat/sudo-debuginfo","source":"RHSA-2021:0221"},{"ecosystem":"Red Hat:enterprise_linux:7::client","fixed":["0:1.8.23-10.el7_9.1"],"introduced":["0"],"last_affected":[],"package":"sudo-devel","purl":"pkg:rpm/redhat/sudo-devel","source":"RHSA-2021:0221"},{"ecosystem":"Red Hat:enterprise_linux:7::computenode","fixed":["0:1.8.23-10.el7_9.1"],"introduced":["0"],"last_affected":[],"package":"sudo-debuginfo","purl":"pkg:rpm/redhat/sudo-debuginfo","source":"RHSA-2021:0221"},{"ecosystem":"Red Hat:enterprise_linux:7::computenode","fixed":["0:1.8.23-10.el7_9.1"],"introduced":["0"],"last_affected":[],"package":"sudo-devel","purl":"pkg:rpm/redhat/sudo-devel","source":"RHSA-2021:0221"},{"ecosystem":"Red Hat:enterprise_linux:7::server","fixed":["0:1.8.23-10.el7_9.1"],"introduced":["0"],"last_affected":[],"package":"sudo","purl":"pkg:rpm/redhat/sudo","source":"RHSA-2021:0221"},{"ecosystem":"Red Hat:enterprise_linux:7::server","fixed":["0:1.8.23-10.el7_9.1"],"introduced":["0"],"last_affected":[],"package":"sudo-debuginfo","purl":"pkg:rpm/redhat/sudo-debuginfo","source":"RHSA-2021:0221"},{"ecosystem":"Red Hat:enterprise_linux:7::server","fixed":["0:1.8.23-10.el7_9.1"],"introduced":["0"],"last_affected":[],"package":"sudo-devel","purl":"pkg:rpm/redhat/sudo-devel","source":"RHSA-2021:0221"},{"ecosystem":"Red Hat:enterprise_linux:7::workstation","fixed":["0:1.8.23-10.el7_9.1"],"introduced":["0"],"last_affected":[],"package":"sudo","purl":"pkg:rpm/redhat/sudo","source":"RHSA-2021:0221"},{"ecosystem":"Red Hat:enterprise_linux:7::workstation","fixed":["0:1.8.23-10.el7_9.1"],"introduced":["0"],"last_affected":[],"package":"sudo-debuginfo","purl":"pkg:rpm/redhat/sudo-debuginfo","source":"RHSA-2021:0221"},{"ecosystem":"Red Hat:enterprise_linux:7::workstation","fixed":["0:1.8.23-10.el7_9.1"],"introduced":["0"],"last_affected":[],"package":"sudo-devel","purl":"pkg:rpm/redhat/sudo-devel","source":"RHSA-2021:0221"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:1.8.29-6.el8_3.1"],"introduced":["0"],"last_affected":[],"package":"sudo","purl":"pkg:rpm/redhat/sudo","source":"RHSA-2021:0218"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:1.8.29-6.el8_3.1"],"introduced":["0"],"last_affected":[],"package":"sudo-debuginfo","purl":"pkg:rpm/redhat/sudo-debuginfo","source":"RHSA-2021:0218"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:1.8.29-6.el8_3.1"],"introduced":["0"],"last_affected":[],"package":"sudo-debugsource","purl":"pkg:rpm/redhat/sudo-debugsource","source":"RHSA-2021:0218"},{"ecosystem":"Red Hat:rhel_aus:7.2::server","fixed":["0:1.8.6p7-17.el7_2.3"],"introduced":["0"],"last_affected":[],"package":"sudo","purl":"pkg:rpm/redhat/sudo","source":"RHSA-2021:0226"},{"ecosystem":"Red Hat:rhel_aus:7.2::server","fixed":["0:1.8.6p7-17.el7_2.3"],"introduced":["0"],"last_affected":[],"package":"sudo-debuginfo","purl":"pkg:rpm/redhat/sudo-debuginfo","source":"RHSA-2021:0226"},{"ecosystem":"Red Hat:rhel_aus:7.2::server","fixed":["0:1.8.6p7-17.el7_2.3"],"introduced":["0"],"last_affected":[],"package":"sudo-devel","purl":"pkg:rpm/redhat/sudo-devel","source":"RHSA-2021:0226"},{"ecosystem":"Red Hat:rhel_aus:7.3::server","fixed":["0:1.8.6p7-23.el7_3.3"],"introduced":["0"],"last_affected":[],"package":"sudo","purl":"pkg:rpm/redhat/sudo","source":"RHSA-2021:0225"},{"ecosystem":"Red Hat:rhel_aus:7.3::server","fixed":["0:1.8.6p7-23.el7_3.3"],"introduced":["0"],"last_affected":[],"package":"sudo-debuginfo","purl":"pkg:rpm/redhat/sudo-debuginfo","source":"RHSA-2021:0225"},{"ecosystem":"Red Hat:rhel_aus:7.3::server","fixed":["0:1.8.6p7-23.el7_3.3"],"introduced":["0"],"last_affected":[],"package":"sudo-devel","purl":"pkg:rpm/redhat/sudo-devel","source":"RHSA-2021:0225"},{"ecosystem":"Red Hat:rhel_aus:7.4::server","fixed":["0:1.8.19p2-12.el7_4.2"],"introduced":["0"],"last_affected":[],"package":"sudo","purl":"pkg:rpm/redhat/sudo","source":"RHSA-2021:0224"},{"ecosystem":"Red Hat:rhel_aus:7.4::server","fixed":["0:1.8.19p2-12.el7_4.2"],"introduced":["0"],"last_affected":[],"package":"sudo-debuginfo","purl":"pkg:rpm/redhat/sudo-debuginfo","source":"RHSA-2021:0224"},{"ecosystem":"Red Hat:rhel_aus:7.4::server","fixed":["0:1.8.19p2-12.el7_4.2"],"introduced":["0"],"last_affected":[],"package":"sudo-devel","purl":"pkg:rpm/redhat/sudo-devel","source":"RHSA-2021:0224"},{"ecosystem":"Red Hat:rhel_e4s:7.4::server","fixed":["0:1.8.19p2-12.el7_4.2"],"introduced":["0"],"last_affected":[],"package":"sudo","purl":"pkg:rpm/redhat/sudo","source":"RHSA-2021:0224"},{"ecosystem":"Red Hat:rhel_e4s:7.4::server","fixed":["0:1.8.19p2-12.el7_4.2"],"introduced":["0"],"last_affected":[],"package":"sudo-debuginfo","purl":"pkg:rpm/redhat/sudo-debuginfo","source":"RHSA-2021:0224"},{"ecosystem":"Red Hat:rhel_e4s:7.4::server","fixed":["0:1.8.19p2-12.el7_4.2"],"introduced":["0"],"last_affected":[],"package":"sudo-devel","purl":"pkg:rpm/redhat/sudo-devel","source":"RHSA-2021:0224"},{"ecosystem":"Red Hat:rhel_els:6","fixed":["0:1.8.6p3-29.el6_10.4"],"introduced":["0"],"last_affected":[],"package":"sudo","purl":"pkg:rpm/redhat/sudo","source":"RHSA-2021:0227"},{"ecosystem":"Red Hat:rhel_els:6","fixed":["0:1.8.6p3-29.el6_10.4"],"introduced":["0"],"last_affected":[],"package":"sudo-debuginfo","purl":"pkg:rpm/redhat/sudo-debuginfo","source":"RHSA-2021:0227"},{"ecosystem":"Red Hat:rhel_els:6","fixed":["0:1.8.6p3-29.el6_10.4"],"introduced":["0"],"last_affected":[],"package":"sudo-devel","purl":"pkg:rpm/redhat/sudo-devel","source":"RHSA-2021:0227"},{"ecosystem":"Red Hat:rhel_eus:7.6::computenode","fixed":["0:1.8.23-3.el7_6.2"],"introduced":["0"],"last_affected":[],"package":"sudo","purl":"pkg:rpm/redhat/sudo","source":"RHSA-2021:0223"},{"ecosystem":"Red Hat:rhel_eus:7.6::computenode","fixed":["0:1.8.23-3.el7_6.2"],"introduced":["0"],"last_affected":[],"package":"sudo-debuginfo","purl":"pkg:rpm/redhat/sudo-debuginfo","source":"RHSA-2021:0223"},{"ecosystem":"Red Hat:rhel_eus:7.6::computenode","fixed":["0:1.8.23-3.el7_6.2"],"introduced":["0"],"last_affected":[],"package":"sudo-devel","purl":"pkg:rpm/redhat/sudo-devel","source":"RHSA-2021:0223"},{"ecosystem":"Red Hat:rhel_eus:7.6::server","fixed":["0:1.8.23-3.el7_6.2"],"introduced":["0"],"last_affected":[],"package":"sudo","purl":"pkg:rpm/redhat/sudo","source":"RHSA-2021:0223"},{"ecosystem":"Red Hat:rhel_eus:7.6::server","fixed":["0:1.8.23-3.el7_6.2"],"introduced":["0"],"last_affected":[],"package":"sudo-debuginfo","purl":"pkg:rpm/redhat/sudo-debuginfo","source":"RHSA-2021:0223"},{"ecosystem":"Red Hat:rhel_eus:7.6::server","fixed":["0:1.8.23-3.el7_6.2"],"introduced":["0"],"last_affected":[],"package":"sudo-devel","purl":"pkg:rpm/redhat/sudo-devel","source":"RHSA-2021:0223"},{"ecosystem":"Red Hat:rhel_eus:7.7::computenode","fixed":["0:1.8.23-4.el7_7.3"],"introduced":["0"],"last_affected":[],"package":"sudo","purl":"pkg:rpm/redhat/sudo","source":"RHSA-2021:0222"},{"ecosystem":"Red Hat:rhel_eus:7.7::computenode","fixed":["0:1.8.23-4.el7_7.3"],"introduced":["0"],"last_affected":[],"package":"sudo-debuginfo","purl":"pkg:rpm/redhat/sudo-debuginfo","source":"RHSA-2021:0222"},{"ecosystem":"Red Hat:rhel_eus:7.7::computenode","fixed":["0:1.8.23-4.el7_7.3"],"introduced":["0"],"last_affected":[],"package":"sudo-devel","purl":"pkg:rpm/redhat/sudo-devel","source":"RHSA-2021:0222"},{"ecosystem":"Red Hat:rhel_eus:7.7::server","fixed":["0:1.8.23-4.el7_7.3"],"introduced":["0"],"last_affected":[],"package":"sudo","purl":"pkg:rpm/redhat/sudo","source":"RHSA-2021:0222"},{"ecosystem":"Red Hat:rhel_eus:7.7::server","fixed":["0:1.8.23-4.el7_7.3"],"introduced":["0"],"last_affected":[],"package":"sudo-debuginfo","purl":"pkg:rpm/redhat/sudo-debuginfo","source":"RHSA-2021:0222"}],"prev":{"headline":"snapd created ~/snap with too-wide permissions","id":"CVE-2021-3155"},"products":["n/a"],"published":"2021-01-26","related":[{"cvss_score":8.8,"headline":"Privilege escalation in n/a","id":"CVE-2021-3187","kev_date_added":null,"published":"2023-12-11"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"open","licence":"CC0 1.0","name":"CISA KEV"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"active","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-10-21","vendors":["n/a"]},"summary":"A heap-based buffer overflow in Sudo allows local attackers to escalate privileges to root via a crafted command-line argument.","url":"https://insights.sbomify.com/CVE-2021-3156/"}