CVE-2018-7738 Command injection in n/a

High 7.8 Published Updated

Local attackers can gain privileges by embedding shell commands in mountpoint names, exploiting unsafe bash completion handling in util-linux.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2018-7738?

CVE-2018-7738 is a high-severity command injection vulnerability in n/a, published on 6 Mar 2018. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In util-linux before 2.32-rc1, bash-completion/umount allows local users to gain privileges by embedding shell commands in a mountpoint name, which is mishandled during a umount command (within Bash) by a different user, as demonstrated by logging in as root and entering umount followed by a tab character for autocompletion.

Which versions are affected by CVE-2018-7738?

It affects 1 product.

Linux distribution packages (40)
python-libmount SUSE:Enterprise Storage 4All versions2.28-44.18.38
util-linux SUSE:Enterprise Storage 4All versions2.28-44.18.18
util-linux-systemd SUSE:Enterprise Storage 4All versions2.28-44.18.25
python-libmount SUSE:Linux Enterprise Desktop 12 SP3All versions2.29.2-3.12.1
python-libmount SUSE:Linux Enterprise Desktop 12 SP3All versions2.29.2-3.8.1
util-linux SUSE:Linux Enterprise Desktop 12 SP3All versions2.29.2-3.12.1
util-linux SUSE:Linux Enterprise Desktop 12 SP3All versions2.29.2-3.8.1
util-linux-systemd SUSE:Linux Enterprise Desktop 12 SP3All versions2.29.2-3.12.1
util-linux-systemd SUSE:Linux Enterprise Desktop 12 SP3All versions2.29.2-3.8.1
util-linux SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSSAll versions2.33.2-150100.4.40.1
util-linux-systemd SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSSAll versions2.33.2-150100.4.40.1
util-linux SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSSAll versions2.33.2-150100.4.40.1
util-linux-systemd SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSSAll versions2.33.2-150100.4.40.1
util-linux SUSE:Linux Enterprise Module for Basesystem 15All versions2.31.1-9.3.1
util-linux-systemd SUSE:Linux Enterprise Module for Basesystem 15All versions2.31.1-9.3.1
util-linux-systemd SUSE:Linux Enterprise Module for Server Applications 15All versions2.31.1-9.3.1
python-libmount SUSE:Linux Enterprise Server 12 SP2-BCLAll versions2.28-44.18.38
util-linux SUSE:Linux Enterprise Server 12 SP2-BCLAll versions2.28-44.18.18
util-linux-systemd SUSE:Linux Enterprise Server 12 SP2-BCLAll versions2.28-44.18.25
python-libmount SUSE:Linux Enterprise Server 12 SP2-LTSSAll versions2.28-44.18.38
util-linux SUSE:Linux Enterprise Server 12 SP2-LTSSAll versions2.28-44.18.18
util-linux-systemd SUSE:Linux Enterprise Server 12 SP2-LTSSAll versions2.28-44.18.25
python-libmount SUSE:Linux Enterprise Server 12 SP3All versions2.29.2-3.12.1
python-libmount SUSE:Linux Enterprise Server 12 SP3All versions2.29.2-3.8.1
util-linux SUSE:Linux Enterprise Server 12 SP3All versions2.29.2-3.12.1
util-linux SUSE:Linux Enterprise Server 12 SP3All versions2.29.2-3.8.1
util-linux-systemd SUSE:Linux Enterprise Server 12 SP3All versions2.29.2-3.12.1
util-linux-systemd SUSE:Linux Enterprise Server 12 SP3All versions2.29.2-3.8.1
python-libmount SUSE:Linux Enterprise Server 12 SP5All versions2.33.2-4.33.1
util-linux SUSE:Linux Enterprise Server 12 SP5All versions2.33.2-4.33.1
util-linux-systemd SUSE:Linux Enterprise Server 12 SP5All versions2.33.2-4.33.1
util-linux SUSE:Linux Enterprise Server 15 SP1-LTSSAll versions2.33.2-150100.4.40.1
util-linux-systemd SUSE:Linux Enterprise Server 15 SP1-LTSSAll versions2.33.2-150100.4.40.1
util-linux SUSE:Linux Enterprise Server 15 SP2-LTSSAll versions2.33.2-150100.4.40.1
util-linux-systemd SUSE:Linux Enterprise Server 15 SP2-LTSSAll versions2.33.2-150100.4.40.1
python-libmount SUSE:Linux Enterprise Server for SAP Applications 12 SP2All versions2.28-44.18.38
util-linux SUSE:Linux Enterprise Server for SAP Applications 12 SP2All versions2.28-44.18.18
util-linux-systemd SUSE:Linux Enterprise Server for SAP Applications 12 SP2All versions2.28-44.18.25
python-libmount SUSE:Linux Enterprise Server for SAP Applications 12 SP3All versions2.29.2-3.12.1
python-libmount SUSE:Linux Enterprise Server for SAP Applications 12 SP3All versions2.29.2-3.8.1

Products include Kernel Util-Linux.

How do I fix CVE-2018-7738?

Upgrade to a fixed version.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2018-7738 being exploited?

There is no known exploitation of CVE-2018-7738 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2018-7738, DSA-4134-1, GHSA-jh5x-7c5f-4c44, MGASA-2018-0237, SUSE-SU-2018:2066-1, SUSE-SU-2018:2071-1 and 7 more.

Is CVE-2018-7738 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free