CVE-2019-18634

7.8 HIGH

📋 TL;DR

This CVE describes a stack-based buffer overflow vulnerability in Sudo when the pwfeedback option is enabled. Attackers can exploit this by providing a long string to sudo's stdin, potentially allowing privilege escalation to root. The vulnerability primarily affects Linux Mint and elementary OS users where pwfeedback is enabled by default, but any system with this option enabled is vulnerable.

💻 Affected Systems

Products:
  • sudo
Versions: All versions before 1.8.26
Operating Systems: Linux Mint, elementary OS, Any Linux/Unix with sudo and pwfeedback enabled
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when pwfeedback option is enabled in /etc/sudoers. This is default in Linux Mint and elementary OS but not in upstream sudo or most other distributions.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full root privilege escalation leading to complete system compromise, data theft, and persistent backdoor installation.

🟠

Likely Case

Local privilege escalation allowing attackers to gain root access on affected systems.

🟢

If Mitigated

No impact if pwfeedback is disabled or systems are patched.

🌐 Internet-Facing: LOW - This is primarily a local privilege escalation vulnerability requiring access to a user account.
🏢 Internal Only: HIGH - Any compromised user account on affected systems can potentially escalate to root.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: CONFIRMED
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploit requires local user access and pwfeedback enabled. Multiple public exploits exist.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: sudo 1.8.26 and later

Vendor Advisory: https://www.sudo.ws/security/advisories/pwfeedback_adv.html

Restart Required: No

Instructions:

1. Update sudo package using your distribution's package manager. 2. For Debian/Ubuntu: sudo apt update && sudo apt upgrade sudo. 3. For RHEL/CentOS: sudo yum update sudo. 4. For Arch: sudo pacman -Syu sudo. 5. Verify version with sudo --version.

🔧 Temporary Workarounds

Disable pwfeedback

linux

Remove or comment out the 'pwfeedback' option from /etc/sudoers

sudo visudo
# Remove or comment out any line containing 'pwfeedback'

🧯 If You Can't Patch

  • Disable pwfeedback option in /etc/sudoers immediately
  • Restrict sudo access to only necessary users and commands

🔍 How to Verify

Check if Vulnerable:

Check if pwfeedback is enabled: sudo grep -r 'pwfeedback' /etc/sudoers /etc/sudoers.d/ 2>/dev/null

Check Version:

sudo --version | head -1

Verify Fix Applied:

Check sudo version: sudo --version | grep 'Sudo version' and ensure it's 1.8.26 or higher

📡 Detection & Monitoring

Log Indicators:

  • Failed sudo attempts with unusually long input
  • Successful privilege escalation from non-privileged users

Network Indicators:

  • Not applicable - local exploit

SIEM Query:

source="sudo" AND (event="authentication failure" AND input_length>1000) OR (event="privilege escalation" AND user_change="root")

🔗 References

📤 Share & Export