CVE-2021-3156: n/a Buffer Overflow

CVE-2021-3156

NVD

Vulnerability Summary

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.
Severity Level
UNKNOWN
Published Date
Jan 26, 2021
Last Modified
Oct 21, 2025
PoC
Available(Metasploit)
Exploitation Status
ACTIVE
Root Weakness (CWE)
N/A

Affected & Patched Versions

Affected Versions
  • n/a
Patched Versions
No patched version published yet
Until a fix ships, reduce exposure:
  • Restrict access to the affected service or interface to trusted networks.
  • Disable the affected feature if you do not need it.
  • Watch the vendor advisory for a firmware or software update.

What to do

Patch now. CISA lists this flaw as exploited in the wild and set a federal remediation deadline of Apr 27, 2022.

  1. Check whether you run n/a and which version.
  2. No patched version is listed yet. Limit access to the affected service to trusted networks, and disable the feature if you can.
  3. Subscribe to the vendor advisory so you learn when a fix ships.
  4. Review logs and exposed services for signs of earlier compromise.

CISA required action: Apply updates per vendor instructions.

CISA KEV Status

Listed in Known Exploited Vulnerabilities
Added: Apr 6, 2022
Remediation due: Apr 27, 2022 (deadline passed)

Timeline

  • Jan 26, 2021Published
  • Apr 6, 2022Added to CISA KEV catalog
  • Apr 27, 2022KEV remediation due date
  • Oct 21, 2025Record last modified

Score, severity and exploitation changes are tracked from the day Watchtower started logging them.

Get notified about new n/a CVEsYou are reading CVE-2021-3156. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

External References

Data last checked: Dec 1, 2026 06:11 UTC