Buffer Overflow Vulnerability in Sudo Package: CVE-2019-18634

sudo Updated 02 Oct 2025

Summary

29/01/2020
N/A
Yes i
High
7.8

ALPINE-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. Affects sudo versions < 1.8.27-r2. Fixed in 1.8.27-r2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The Sudo package is a widely used utility in Unix-like operating systems that allows users to execute commands with elevated privileges. It is essential for system administration and security management. However, certain configurations, such as enabling pwfeedback in /etc/sudoers, can expose the system to vulnerabilities, including buffer overflow attacks.

Vulnerability Detail

In Sudo versions prior to 1.8.26, if the pwfeedback option is enabled, it allows users to trigger a stack-based buffer overflow in the privileged sudo process. This vulnerability arises from the way user input is handled in the getln() function within tgetpass.c. An attacker can exploit this by delivering a long string to stdin, potentially leading to arbitrary code execution, system compromise, or privilege escalation.

How To Fix

Minimum fixed version

1.8.27-r2

This is the first release that contains the fix.

sudo apk add --upgrade sudo

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating is not immediately possible, consider disabling the pwfeedback option in /etc/sudoers to mitigate the risk. This can be done by commenting out or removing the line that includes 'Defaults pwfeedback'.

Conclusion

CVE-2019-18634 represents a significant security risk for systems using the Sudo package with the pwfeedback option enabled. It is crucial to update to the latest patched versions or disable the vulnerable option to protect against potential exploits.

See every vulnerability recorded for sudo →

Share this vulnerability

FAQ

CVE-2019-18634 is a vulnerability in the Sudo package that can lead to a stack-based buffer overflow if the pwfeedback option is enabled.

If exploited, this vulnerability can allow an attacker to execute arbitrary code, potentially compromising the system or escalating privileges.

Sudo versions prior to 1.8.26 are affected, with specific patched versions available for various Alpine Linux releases.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Check your application against the vulnerability using the Vulert playground at Vulert Scanner.

The CVSS score for CVE-2019-18634 is 7.8, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for sudo.

How To Fix

Minimum fixed version

1.8.27-r2

This is the first release that contains the fix.

sudo apk add --upgrade sudo

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback