cve.bz

CVE-2019-18634 Out-of-bounds Write

7.8 highExploitEPSS 19%

High (7.8). EPSS 19% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
19% (unchanged from 19% a week ago; 19% 30 days ago) estimated probability of exploitation activity in the next 30 days; 97th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-787 Out-of-bounds Write
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2019-18634 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2019-18634?via=ask-ai-copy and https://cve.bz/cve/CVE-2019-18634?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2019-18634 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
sudo_project:sudofrom 1.7.1 before 1.8.26
debian:debian_linux8.0
debian:debian_linux9.0
debian:debian_linux10.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian8sudo1.8.10p3-1+deb8u7DLA-2094-1
Debian9sudo1.8.19p1-2.1+deb9u2DSA-4614-1
Debian12, 13, 14sudo1.8.31-1DEBIAN-CVE-2019-18634
Ubuntu16.04:LTSsudo1.8.16-0ubuntu1.9UBUNTU-CVE-2019-18634 USN-4263-1
Ubuntu18.04:LTSsudo1.8.21p2-3ubuntu1.2UBUNTU-CVE-2019-18634 USN-4263-1
UbuntuPro:14.04:LTSsudo1.8.9p5-1ubuntu1.5+esm3UBUNTU-CVE-2019-18634 USN-4263-2
Red Hatenterprise_linux:6::client, enterprise_linux:6::computenode, enterprise_linux:6::server and 1 moresudo, sudo-devel, sudo-debuginfo0:1.8.6p3-29.el6_10.3RHSA-2020:0726
Red Hatenterprise_linux:7::client, enterprise_linux:7::computenode, enterprise_linux:7::server and 1 moresudo, sudo-devel, sudo-debuginfo0:1.8.23-4.el7_7.2RHSA-2020:0540
Red Hatenterprise_linux:8::baseossudo, sudo-debuginfo, sudo-debugsource0:1.8.25p1-8.el8_1.1RHSA-2020:0487
Red Hatrhel_e4s:8.0::baseossudo, sudo-debuginfo, sudo-debugsource0:1.8.25p1-4.el8_0.3RHSA-2020:0509
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Desktop 12 SP4 and 8 moresudo1.8.20p2-3.17.1SUSE-SU-2020:0406-1
SUSELinux Enterprise High Performance Computing 15-ESPOS, Linux Enterprise High Performance Computing 15-LTSS, Linux Enterprise Module for Basesystem 15 and 3 moresudo1.8.22-4.9.1SUSE-SU-2020:0408-1
SUSELinux Enterprise Server 12 SP1-LTSS, Linux Enterprise Server for SAP Applications 12 SP1sudo1.8.10p3-2.32.1SUSE-SU-2020:0390-1
SUSELinux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP2-LTSS, Linux Enterprise Server for SAP Applications 12 SP2 and 1 moresudo1.8.10p3-10.26.1SUSE-SU-2020:0407-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5sudo1.8.27-4.3.1SUSE-SU-2020:0409-1
openSUSELeap 15.1sudo1.8.22-lp151.5.6.1openSUSE-SU-2020:0244-1
openSUSETumbleweedsudo1.9.7p2-1.4openSUSE-SU-2024:11413-1
Alpinev3.8sudo1.8.23-r4ALPINE-CVE-2019-18634
Alpinev3.9sudo1.8.25_p1-r3ALPINE-CVE-2019-18634
Alpinev3.10sudo1.8.27-r2ALPINE-CVE-2019-18634
Alpinev3.11sudo1.8.29-r2ALPINE-CVE-2019-18634
Alpinev3.12, v3.13, v3.14 and 10 moresudo1.8.31-r0ALPINE-CVE-2019-18634

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This flaw can only be exploited if the option `pwfeedback` is enabled in sudo configuration. This option is not enabled by default in any version of Red Hat Enterprise Linux.

The sudo packages distributed with Red Hat Enterprise Linux versions are compiled using gcc's stack-protector feature. The "Stack Smashing Protection" may help mitigate code execution attacks for this flaw.

Red Hat Enterprise Linux 5 is not affected as it doesn't include the commit which introduced the vulnerability.

Red Hat's mitigation

Please follow the steps bellow as mitigation:

1. Check the default properties set for sudo by running:

~~~

$ sudo -l

[sudo] password for user:

Matching Defaults entries for users on localhost:

!visiblepw, pwfeedback, always_set_home, match_group_by_gid, always_query_group_plugin, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS",

env_keep+="MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE", env_keep+="LC_COLLATE LC_IDENTIFICATION

LC_MEASUREMENT LC_MESSAGES", env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE", env_keep+="LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY", secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin

~~~

2. If `pwfeedback` is enabled as shown above, edit your `/etc/sudoers` file, changing the line:

~~~

Defaults pwfeedback

~~~

To:

~~~

Defaults !pwfeedback

~~~

This will disable visual feedback on password typing, making sure the attack is not possible anymore.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6sudo-0:1.8.6p3-29.el6_10.3Fixed 2020-03-05RHSA-2020:0726
Red Hat Enterprise Linux 7sudo-0:1.8.23-4.el7_7.2Fixed 2020-02-19RHSA-2020:0540
Red Hat Enterprise Linux 8sudo-0:1.8.25p1-8.el8_1.1Fixed 2020-02-14RHSA-2020:0487
Red Hat Enterprise Linux 8.0 Update Services for SAP Solutionssudo-0:1.8.25p1-4.el8_0.3Fixed 2020-02-14RHSA-2020:0509
Red Hat Enterprise Linux 5sudoNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2019-18634.

Public exploits

GitHub PoC (unverified)

Repositories on GitHub named after this CVE. Nobody has checked them and they are not scanned: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it.

  • DevTeam6Rabbit/CVE-2019-18634-writeup 0 stars, created
    analysis of the sudo buffer overflow affect sudo version <1.8.26 and how to use GCC to compile publicly availible exploits

References

Check your stackJSON