cbcvebase.
CVE-2019-18634
published 2020-01-29

CVE-2019-18634: In Sudo before 1.8.26, if pwfeedback is enabled in /etc/sudoers, users can trigger a stack-based buffer overflow in the privileged sudo process. (pwfeedback is…

PriorityP262high7.8CVSS 3.1
AVLACLPRLUINSUCHIHAH
EXPLOIT
EPSS
19.43%
97.1th percentile
In Sudo before 1.8.26, if pwfeedback is enabled in /etc/sudoers, users can trigger a stack-based buffer overflow in the privileged sudo process. (pwfeedback is a default setting in Linux Mint and elementary OS; however, it is NOT the default for upstream and many other packages, and would exist only if enabled by an administrator.) The attacker needs to deliver a long string to the stdin of getln() in tgetpass.c.

Affected

9 ranges
VendorProductVersion rangeFixed in
debiandebian_linux
debiandebian_linux
debiandebian_linux
debiansudo< sudo 1.8.31-1 (bookworm)sudo 1.8.31-1 (bookworm)
sudo_projectsudo>= 0 < 1.8.31-11.8.31-1
sudo_projectsudo>= 0 < 1.8.31-11.8.31-1
sudo_projectsudo>= 0 < 1.8.31-11.8.31-1
sudo_projectsudo>= 0 < 1.8.31-11.8.31-1
sudo_projectsudo>= 1.7.1 < 1.8.261.8.26

Detection & IOCsextracted from sources · hover to see the quote

urlhttps://raw.githubusercontent.com/saleemrashid/sudo-cve-2019-18634/master/exploit.c
path/tmp/pipe
path/tmp/pty
commandperl -e 'print(("A" x 100 . "\x{00}") x 50)' | sudo -S id
commandsudo -k -S id < /tmp/pty
filenameexploit.c
  • Trigger condition: CVE-2019-18634 is only exploitable when 'pwfeedback' is enabled in /etc/sudoers. Audit sudoers files for this setting as a detection/triage step.
  • Monitor for creation of SUID binaries in /tmp (e.g., /tmp/pipe) by non-root users, which is a post-exploitation step in the published exploit.
  • Monitor for use of SUDO_ASKPASS environment variable pointing to /tmp paths, used in the exploit to redirect sudo's password input.
  • Monitor for wget/curl of the saleemrashid sudo-cve-2019-18634 GitHub repository exploit.c onto target systems.
  • ·The vulnerability only exists if 'pwfeedback' is enabled in /etc/sudoers. It is NOT enabled by default in upstream sudo or most distributions, but IS enabled by default in Linux Mint and elementary OS.
  • ·Sudo versions prior to 1.8.26 are vulnerable; version 1.8.31 includes the patch.

CVSS provenance

nvdv3.17.8HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvdv2.04.6MEDIUMAV:L/AC:L/Au:N/C:P/I:P/A:P
osv7.8HIGH
vendor_debian7.8HIGH
vendor_redhat7.8HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.