Every CVE Search/ Get API key

CVE-2018-1000156

GNU Patch version 2.7.6 contains an input validation vulnerability when processing patch files,...

7.8 HighFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

5.33%Down 2.0 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 7.8

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.

Record
CVE-2018-1000156
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 2.0
6.8 MediumAV:N/AC:M/Au:N/C:P/I:P/A:P
Weakness
CWE-20
Updated
2026-11-02
CVE List No score

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.

Record
CVE-2018-1000156
Updated
2026-11-02
EUVDEUVD-2018-1862 0.0

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.

Record
EUVD-2018-1862
CVSS
0.0 NoneCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-r9rq-mhxg-686q 7.8

GNU Patch version 2.7.6 contains an input validation vulnerability when processing patch files,...

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.

Record
GHSA-r9rq-mhxg-686q
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-20
Updated
2026-11-02
OSVALPINE-CVE-2018-1000156 7.8

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.

Record
ALPINE-CVE-2018-1000156
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVAZL-35101 7.8

CVE-2018-1000156 affecting package patch for versions less than 2.7.6-9

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.

Record
AZL-35101
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-05
Show 21 moreShow less
OSVAZL-6785 7.8

CVE-2018-1000156 affecting package patch for versions less than 2.7.6-7

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.

Record
AZL-6785
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVBELL-CVE-2018-1000156 7.8

CVE-2018-1000156 does not affect BellSoft software

Record
BELL-CVE-2018-1000156
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSV 7.8

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.

Record
CVE-2018-1000156
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2018-1000156 7.8

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.

Record
DEBIAN-CVE-2018-1000156
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVJLSEC-2026-12 7.8

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.

Record
JLSEC-2026-12
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 2.0
6.8 MediumAV:N/AC:M/Au:N/C:P/I:P/A:P
Updated
2026-11-02
OSVRHSA-2018:1199 7.8

Red Hat Security Advisory: patch security update

Record
RHSA-2018:1199
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2018:1200 7.8

Red Hat Security Advisory: patch security update

Record
RHSA-2018:1200
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2018:2091 7.8

Red Hat Security Advisory: patch security update

Record
RHSA-2018:2091
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2018:2092 7.8

Red Hat Security Advisory: patch security update

Record
RHSA-2018:2092
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2018:2093 7.8

Red Hat Security Advisory: patch security update

Record
RHSA-2018:2093
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2018:2094 7.8

Red Hat Security Advisory: patch security update

Record
RHSA-2018:2094
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2018:2095 7.8

Red Hat Security Advisory: patch security update

Record
RHSA-2018:2095
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2018:2096 7.8

Red Hat Security Advisory: patch security update

Record
RHSA-2018:2096
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2018:2097 7.8

Red Hat Security Advisory: patch security update

Record
RHSA-2018:2097
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2018-1000156 7.8

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.

Record
UBUNTU-CVE-2018-1000156
CVSS 3.0
7.8 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVMGASA-2018-0277 No score

Updated patch packages fix security vulnerabilities

Updated patch package fixes security vulnerabilities:

It was discovered that Patch incorrectly handled certain files. An attacker could possibly use this to cause a denial of service (CVE-2016-10713).

It was discovered that Patch incorrectly handled certain inputs. An attacker could possibly use this to cause a denial of service (CVE-2018-6951).

It was discovered that Patch incorrectly handled certain input validation. An attacker could possibly use this to execute arbitrary code (CVE-2018-1000156).

Record
MGASA-2018-0277
Updated
2026-11-02
OSVopenSUSE-SU-2024:11151-1 No score

patch-2.7.6-3.43 on GA media

These are all security issues fixed in the patch-2.7.6-3.43 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:11151-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:11372-1 No score

bosh-2021.09.01-44.2 on GA media

These are all security issues fixed in the bosh-2021.09.01-44.2 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:11372-1
Updated
2026-11-02
OSVSUSE-SU-2018:1128-1 No score

Security update for patch

This update for patch fixes the following issues:

Security issues fixed:

  • CVE-2018-1000156: Malicious patch files cause ed to execute arbitrary commands (bsc#1088420).
  • CVE-2018-6951: Fixed NULL pointer dereference in the intuit_diff_type function in pch.c (bsc#1080918).
  • CVE-2016-10713: Fixed out-of-bounds access within pch_write_line() in pch.c (bsc#1080918).
Record
SUSE-SU-2018:1128-1
Updated
2026-11-02
OSVSUSE-SU-2018:1162-1 No score

Security update for patch

This update for patch fixes several issues.

These security issues were fixed:

  • CVE-2018-1000156: patch: Malicious patch files cause ed to execute arbitrary commands (bsc#1088420).
  • CVE-2014-9637: Prevent DoS by remote attackers (memory consumption and segmentation fault) via a crafted diff file (bsc#914891).
  • CVE-2016-10713: Prevent out-of-bounds access within pch_write_line() that could have lead to DoS via a crafted input file (bsc#1080918).
  • CVE-2010-4651: Fixed a directory traversal bug (bsc#662957):
Record
SUSE-SU-2018:1162-1
Updated
2026-11-02
OSVUSN-3624-1 No score

patch vulnerabilities

It was discovered that Patch incorrectly handled certain files. An attacker could possibly use this to cause a denial of service. (CVE-2016-10713)

It was discovered that Patch incorrectly handled certain input validation. An attacker could possibly use this to execute arbitrary code. (CVE-2018-1000156)

It was discovered that Patch incorrectly handled certain inputs. An attacker could possibly use this to cause a denial of service. (CVE-2018-6951)

Record
USN-3624-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
patch
Alpine:v3.10
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.11
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.12
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.13
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.14
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.15
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.16
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.17
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.18
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.19
before 2.7.6-r6
2.7.6-r6
Show 72 moreShow less
Affected packages
PackageAffectedFixed
patch
Alpine:v3.20
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.21
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.22
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.23
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.24
before 2.7.6-r6
2.7.6-r6
patch
Alpine:v3.7
before 2.7.6-r0
2.7.6-r0
patch
Alpine:v3.8
before 2.7.6-r4
2.7.6-r4
patch
Alpine:v3.9
before 2.7.6-r6
2.7.6-r6
patch
Azure Linux:3
before 2.7.6-9
2.7.6-9
patch
Azure Linux:2
before 2.7.6-7
2.7.6-7
patch
Debian:12
before 2.7.6-2
2.7.6-2
patch
Debian:13
before 2.7.6-2
2.7.6-2
patch
Debian:14
before 2.7.6-2
2.7.6-2
patch
Debian:7
before 2.6.1-3+deb7u1, plus listed versions
2.6.1-3
2.6.1-3+deb7u1
patch_jll
Julia
before 2.8.0+0
2.8.0+0
patch
Mageia:5
From an advisory covering 3 CVEs
before 2.7.6-1.mga5
2.7.6-1.mga5
patch
Mageia:6
From an advisory covering 3 CVEs
before 2.7.6-1.mga6
2.7.6-1.mga6
patch
Red Hat:enterprise_linux:6::client
before 0:2.6-8.el6_9
0:2.6-8.el6_9
patch-debuginfo
Red Hat:enterprise_linux:6::client
before 0:2.6-8.el6_9
0:2.6-8.el6_9
patch
Red Hat:enterprise_linux:6::computenode
before 0:2.6-8.el6_9
0:2.6-8.el6_9
patch-debuginfo
Red Hat:enterprise_linux:6::computenode
before 0:2.6-8.el6_9
0:2.6-8.el6_9
patch
Red Hat:enterprise_linux:6::server
before 0:2.6-8.el6_9
0:2.6-8.el6_9
patch-debuginfo
Red Hat:enterprise_linux:6::server
before 0:2.6-8.el6_9
0:2.6-8.el6_9
patch
Red Hat:enterprise_linux:6::workstation
before 0:2.6-8.el6_9
0:2.6-8.el6_9
patch-debuginfo
Red Hat:enterprise_linux:6::workstation
before 0:2.6-8.el6_9
0:2.6-8.el6_9
patch
Red Hat:enterprise_linux:7::client
before 0:2.7.1-10.el7_5
0:2.7.1-10.el7_5
patch-debuginfo
Red Hat:enterprise_linux:7::client
before 0:2.7.1-10.el7_5
0:2.7.1-10.el7_5
patch
Red Hat:enterprise_linux:7::computenode
before 0:2.7.1-10.el7_5
0:2.7.1-10.el7_5
patch-debuginfo
Red Hat:enterprise_linux:7::computenode
before 0:2.7.1-10.el7_5
0:2.7.1-10.el7_5
patch
Red Hat:enterprise_linux:7::server
before 0:2.7.1-10.el7_5
0:2.7.1-10.el7_5
patch-debuginfo
Red Hat:enterprise_linux:7::server
before 0:2.7.1-10.el7_5
0:2.7.1-10.el7_5
patch
Red Hat:enterprise_linux:7::workstation
before 0:2.7.1-10.el7_5
0:2.7.1-10.el7_5
patch-debuginfo
Red Hat:enterprise_linux:7::workstation
before 0:2.7.1-10.el7_5
0:2.7.1-10.el7_5
patch
Red Hat:rhel_eus:7.4::computenode
before 0:2.7.1-10.el7_4
0:2.7.1-10.el7_4
patch-debuginfo
Red Hat:rhel_eus:7.4::computenode
before 0:2.7.1-10.el7_4
0:2.7.1-10.el7_4
patch
Red Hat:rhel_eus:7.4::server
before 0:2.7.1-10.el7_4
0:2.7.1-10.el7_4
patch-debuginfo
Red Hat:rhel_eus:7.4::server
before 0:2.7.1-10.el7_4
0:2.7.1-10.el7_4
patch
Red Hat:rhel_eus:7.3::computenode
before 0:2.7.1-10.el7_3
0:2.7.1-10.el7_3
patch-debuginfo
Red Hat:rhel_eus:7.3::computenode
before 0:2.7.1-10.el7_3
0:2.7.1-10.el7_3
patch
Red Hat:rhel_eus:7.3::server
before 0:2.7.1-10.el7_3
0:2.7.1-10.el7_3
patch-debuginfo
Red Hat:rhel_eus:7.3::server
before 0:2.7.1-10.el7_3
0:2.7.1-10.el7_3
patch
Red Hat:rhel_aus:7.2::server
before 0:2.7.1-10.el7_2
0:2.7.1-10.el7_2
patch-debuginfo
Red Hat:rhel_aus:7.2::server
before 0:2.7.1-10.el7_2
0:2.7.1-10.el7_2
patch
Red Hat:rhel_e4s:7.2::server
before 0:2.7.1-10.el7_2
0:2.7.1-10.el7_2
patch-debuginfo
Red Hat:rhel_e4s:7.2::server
before 0:2.7.1-10.el7_2
0:2.7.1-10.el7_2
patch
Red Hat:rhel_tus:7.2::server
before 0:2.7.1-10.el7_2
0:2.7.1-10.el7_2
patch-debuginfo
Red Hat:rhel_tus:7.2::server
before 0:2.7.1-10.el7_2
0:2.7.1-10.el7_2
patch
Red Hat:rhel_eus:6.7::computenode
before 0:2.6-8.el6_7
0:2.6-8.el6_7
patch-debuginfo
Red Hat:rhel_eus:6.7::computenode
before 0:2.6-8.el6_7
0:2.6-8.el6_7
patch
Red Hat:rhel_eus:6.7::server
before 0:2.6-8.el6_7
0:2.6-8.el6_7
patch-debuginfo
Red Hat:rhel_eus:6.7::server
before 0:2.6-8.el6_7
0:2.6-8.el6_7
patch
Red Hat:rhel_aus:6.6::server
before 0:2.6-8.el6_6
0:2.6-8.el6_6
patch-debuginfo
Red Hat:rhel_aus:6.6::server
before 0:2.6-8.el6_6
0:2.6-8.el6_6
patch
Red Hat:rhel_tus:6.6::server
before 0:2.6-8.el6_6
0:2.6-8.el6_6
patch-debuginfo
Red Hat:rhel_tus:6.6::server
before 0:2.6-8.el6_6
0:2.6-8.el6_6
patch
Red Hat:rhel_aus:6.5::server
before 0:2.6-8.el6_5
0:2.6-8.el6_5
patch-debuginfo
Red Hat:rhel_aus:6.5::server
before 0:2.6-8.el6_5
0:2.6-8.el6_5
patch
Red Hat:rhel_aus:6.4::server
before 0:2.6-8.el6_4
0:2.6-8.el6_4
patch-debuginfo
Red Hat:rhel_aus:6.4::server
before 0:2.6-8.el6_4
0:2.6-8.el6_4
patch
SUSE:Linux Enterprise Desktop 12 SP3
From an advisory covering 3 CVEs
before 2.7.5-8.5.1
2.7.5-8.5.1
patch
SUSE:Linux Enterprise Server 12 SP3
From an advisory covering 3 CVEs
before 2.7.5-8.5.1
2.7.5-8.5.1
patch
SUSE:Linux Enterprise Server for SAP Applications 12 SP3
From an advisory covering 3 CVEs
before 2.7.5-8.5.1
2.7.5-8.5.1
patch
SUSE:Linux Enterprise Point of Sale 11 SP3
From an advisory covering 4 CVEs
before 2.5.9-252.22.7.1
2.5.9-252.22.7.1
patch
SUSE:Linux Enterprise Server 11 SP3-LTSS
From an advisory covering 4 CVEs
before 2.5.9-252.22.7.1
2.5.9-252.22.7.1
patch
SUSE:Linux Enterprise Server 11 SP3-TERADATA
From an advisory covering 4 CVEs
before 2.5.9-252.22.7.1
2.5.9-252.22.7.1
patch
SUSE:Linux Enterprise Server 11 SP4
From an advisory covering 4 CVEs
before 2.5.9-252.22.7.1
2.5.9-252.22.7.1
patch
SUSE:Linux Enterprise Server for SAP Applications 11 SP4
From an advisory covering 4 CVEs
before 2.5.9-252.22.7.1
2.5.9-252.22.7.1
patch
Ubuntu:14.04:LTS
before 2.7.1-4ubuntu2.4, plus listed versions
2.7.1-32.7.1-42.7.1-4ubuntu12.7.1-4ubuntu22.7.1-4ubuntu2.3
2.7.1-4ubuntu2.4
patch
Ubuntu:16.04:LTS
before 2.7.5-1ubuntu0.16.04.1, plus listed versions
2.7.5-1
2.7.5-1ubuntu0.16.04.1
patch
Ubuntu:14.04:LTS
From an advisory covering 3 CVEs
before 2.7.1-4ubuntu2.4, plus listed versions
2.7.1-32.7.1-42.7.1-4ubuntu12.7.1-4ubuntu22.7.1-4ubuntu2.3
2.7.1-4ubuntu2.4
patch
Ubuntu:16.04:LTS
From an advisory covering 3 CVEs
before 2.7.5-1ubuntu0.16.04.1, plus listed versions
2.7.5-1
2.7.5-1ubuntu0.16.04.1
patch
openSUSE:Tumbleweed
From an advisory covering 3 CVEs
before 2.7.6-3.43
2.7.6-3.43

History

History
RecordedChangedSources
affected
factsOSV
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2018-1000156 is a high vulnerability (CVSS 7.8) in Gnu Patch, published April 6, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 5.33%, the 92nd percentile. Fixed in patch 2.7.6-r6.

References

Show 53 moreShow less
MoveEnter Open