CVE-2018-1000156 Code injection in n/a

High 7.8 Published Updated

Attackers can execute arbitrary code by crafting a malicious patch file processed by the GNU Patch utility, requiring users to update the tool.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2018-1000156?

CVE-2018-1000156 is a high-severity code injection vulnerability in Canonical Ubuntu Linux, published on 6 Apr 2018. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

GNU Patch version 2.7.6 contains an input validation vulnerability when processing patch files, specifically the EDITOR_PROGRAM invocation (using ed) can result in code execution. This attack appear to be exploitable via a patch file processed via the patch utility. This is similar to FreeBSD's CVE-2015-1418 however although they share a common ancestry the code bases have diverged over time.

Weakness: CWE-20

Which versions are affected by CVE-2018-1000156?

It affects 9 products.

Linux distribution packages (40)
patch Red Hat:enterprise_linux:6::clientAll versions0:2.6-8.el6_9
patch-debuginfo Red Hat:enterprise_linux:6::clientAll versions0:2.6-8.el6_9
patch Red Hat:enterprise_linux:6::computenodeAll versions0:2.6-8.el6_9
patch-debuginfo Red Hat:enterprise_linux:6::computenodeAll versions0:2.6-8.el6_9
patch Red Hat:enterprise_linux:6::serverAll versions0:2.6-8.el6_9
patch-debuginfo Red Hat:enterprise_linux:6::serverAll versions0:2.6-8.el6_9
patch Red Hat:enterprise_linux:6::workstationAll versions0:2.6-8.el6_9
patch-debuginfo Red Hat:enterprise_linux:6::workstationAll versions0:2.6-8.el6_9
patch Red Hat:enterprise_linux:7::clientAll versions0:2.7.1-10.el7_5
patch-debuginfo Red Hat:enterprise_linux:7::clientAll versions0:2.7.1-10.el7_5
patch Red Hat:enterprise_linux:7::computenodeAll versions0:2.7.1-10.el7_5
patch-debuginfo Red Hat:enterprise_linux:7::computenodeAll versions0:2.7.1-10.el7_5
patch Red Hat:enterprise_linux:7::serverAll versions0:2.7.1-10.el7_5
patch-debuginfo Red Hat:enterprise_linux:7::serverAll versions0:2.7.1-10.el7_5
patch Red Hat:enterprise_linux:7::workstationAll versions0:2.7.1-10.el7_5
patch-debuginfo Red Hat:enterprise_linux:7::workstationAll versions0:2.7.1-10.el7_5
patch Red Hat:rhel_aus:6.4::serverAll versions0:2.6-8.el6_4
patch-debuginfo Red Hat:rhel_aus:6.4::serverAll versions0:2.6-8.el6_4
patch Red Hat:rhel_aus:6.5::serverAll versions0:2.6-8.el6_5
patch-debuginfo Red Hat:rhel_aus:6.5::serverAll versions0:2.6-8.el6_5
patch Red Hat:rhel_aus:6.6::serverAll versions0:2.6-8.el6_6
patch-debuginfo Red Hat:rhel_aus:6.6::serverAll versions0:2.6-8.el6_6
patch Red Hat:rhel_aus:7.2::serverAll versions0:2.7.1-10.el7_2
patch-debuginfo Red Hat:rhel_aus:7.2::serverAll versions0:2.7.1-10.el7_2
patch Red Hat:rhel_e4s:7.2::serverAll versions0:2.7.1-10.el7_2
patch-debuginfo Red Hat:rhel_e4s:7.2::serverAll versions0:2.7.1-10.el7_2
patch Red Hat:rhel_eus:6.7::computenodeAll versions0:2.6-8.el6_7
patch-debuginfo Red Hat:rhel_eus:6.7::computenodeAll versions0:2.6-8.el6_7
patch Red Hat:rhel_eus:6.7::serverAll versions0:2.6-8.el6_7
patch-debuginfo Red Hat:rhel_eus:6.7::serverAll versions0:2.6-8.el6_7
patch Red Hat:rhel_eus:7.3::computenodeAll versions0:2.7.1-10.el7_3
patch-debuginfo Red Hat:rhel_eus:7.3::computenodeAll versions0:2.7.1-10.el7_3
patch Red Hat:rhel_eus:7.3::serverAll versions0:2.7.1-10.el7_3
patch-debuginfo Red Hat:rhel_eus:7.3::serverAll versions0:2.7.1-10.el7_3
patch Red Hat:rhel_eus:7.4::computenodeAll versions0:2.7.1-10.el7_4
patch-debuginfo Red Hat:rhel_eus:7.4::computenodeAll versions0:2.7.1-10.el7_4
patch Red Hat:rhel_eus:7.4::serverAll versions0:2.7.1-10.el7_4
patch-debuginfo Red Hat:rhel_eus:7.4::serverAll versions0:2.7.1-10.el7_4
patch Red Hat:rhel_tus:6.6::serverAll versions0:2.6-8.el6_6
patch-debuginfo Red Hat:rhel_tus:6.6::serverAll versions0:2.6-8.el6_6

Products include Canonical Ubuntu Linux, Debian Debian Linux, Gnu Patch, Redhat Enterprise Linux Desktop, Redhat Enterprise Linux Server, Redhat Enterprise Linux Server Aus and 3 more.

How do I fix CVE-2018-1000156?

Upgrade to a fixed version.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2018-1000156 being exploited?

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

All Canonical Ubuntu Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2018-1000156, AZL-35101, AZL-6785, CLEANSTART-2026-ZQ70340, DEBIAN-CVE-2018-1000156, DLA-1348-1 and 13 more.

Is CVE-2018-1000156 in your software?

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

Check your SBOMs for free