CVE-2019-13638
GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited by...
GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited by opening a crafted patch file that contains an ed style diff payload with shell metacharacters. The ed editor does not need to be present on the vulnerable system. This is different from CVE-2018-1000156.
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
What each source reports
NVD Score used
7.8
GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited by opening a crafted patch file that contains an ed style diff payload with shell metacharacters. The ed editor does not need to be present on the vulnerable system. This is different from CVE-2018-1000156.
- Record
CVE-2019-13638- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 2.0
- 9.3 High
AV:N/AC:M/Au:N/C:C/I:C/A:C - Weakness
- CWE-78
- Updated
- 2026-11-02
CVE List No score
GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited by opening a crafted patch file that contains an ed style diff payload with shell metacharacters. The ed editor does not need to be present on the vulnerable system. This is different from CVE-2018-1000156.
- Record
CVE-2019-13638- Updated
- 2026-11-02
EUVDEUVD-2019-5066 No score
GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited by opening a crafted patch file that contains an ed style diff payload with shell metacharacters. The ed editor does not need to be present on the vulnerable system. This is different from CVE-2018-1000156.
- Record
EUVD-2019-5066- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-vqpq-8jvg-rwmx
7.8
GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited by...
GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited by opening a crafted patch file that contains an ed style diff payload with shell metacharacters. The ed editor does not need to be present on the vulnerable system. This is different from CVE-2018-1000156.
- Record
GHSA-vqpq-8jvg-rwmx- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVALPINE-CVE-2019-13638
7.8
GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited by opening a crafted patch file that contains an ed style diff payload with shell metacharacters. The ed editor does not need to be present on the vulnerable system. This is different from CVE-2018-1000156.
- Record
ALPINE-CVE-2019-13638- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVAZL-35106
7.8
CVE-2019-13638 affecting package patch for versions less than 2.7.6-9
GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited by opening a crafted patch file that contains an ed style diff payload with shell metacharacters. The ed editor does not need to be present on the vulnerable system. This is different from CVE-2018-1000156.
- Record
AZL-35106- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-05
Show 14 moreShow less
OSVAZL-6790
7.8
CVE-2019-13638 affecting package patch for versions less than 2.7.6-7
GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited by opening a crafted patch file that contains an ed style diff payload with shell metacharacters. The ed editor does not need to be present on the vulnerable system. This is different from CVE-2018-1000156.
- Record
AZL-6790- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVBELL-CVE-2019-13638
7.8
CVE-2019-13638 does not affect BellSoft software
- Record
BELL-CVE-2019-13638- CVSS 3.0
- 7.8 High
CVSS: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 through 2.7.6 is vulnerable to OS shell command injection that can be exploited by opening a crafted patch file that contains an ed style diff payload with shell metacharacters. The ed editor does not need to be present on the vulnerable system. This is different from CVE-2018-1000156.
- Record
CVE-2019-13638- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2019-13638
7.8
GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited by opening a crafted patch file that contains an ed style diff payload with shell metacharacters. The ed editor does not need to be present on the vulnerable system. This is different from CVE-2018-1000156.
- Record
DEBIAN-CVE-2019-13638- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVJLSEC-2026-17
7.8
GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited by opening a crafted patch file that contains an ed style diff payload with shell metacharacters. The ed editor does not need to be present on the vulnerable system. This is different from CVE-2018-1000156.
- Record
JLSEC-2026-17- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 2.0
- 9.3 Critical
AV:N/AC:M/Au:N/C:C/I:C/A:C - Updated
- 2026-11-02
OSVRHSA-2019:2798
7.8
Red Hat Security Advisory: patch security update
- Record
RHSA-2019:2798- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2019:2964
7.8
Red Hat Security Advisory: patch security update
- Record
RHSA-2019:2964- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2019:3757
7.8
Red Hat Security Advisory: patch security update
- Record
RHSA-2019:3757- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2019:3758
7.8
Red Hat Security Advisory: patch security update
- Record
RHSA-2019:3758- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2019:4061
7.8
Red Hat Security Advisory: patch security update
- Record
RHSA-2019:4061- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2019-13638
7.8
GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited by opening a crafted patch file that contains an ed style diff payload with shell metacharacters. The ed editor does not need to be present on the vulnerable system. This is different from CVE-2018-1000156.
- Record
UBUNTU-CVE-2019-13638- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVMGASA-2020-0093 No score
Updated patch packages fix security vulnerabilities
Updated patch package fixes security vulnerabilities:
-
In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than input files. (CVE-2019-13636).
-
A vulnerability was found in GNU patch through 2.7.6 is vulnerable to OS shell command injection that can be exploited by opening a crafted patch file that contains an ed style diff payload with shell metacharacters (CVE-2019-13638).
-
A vulnerability was found in do_ed_script in pch.c in GNU patch through 2.7.6 does not block strings beginning with a ! character. NOTE: this is the same commit as for CVE-2019-13638, but the ! syntax is specific to ed, and is unrelated to a shell metacharacter (CVE-2018-20969).
- Record
MGASA-2020-0093- Updated
- 2026-11-02
OSVUSN-4071-1 No score
patch vulnerabilities
It was discovered that Patch incorrectly handled certain files. An attacker could possibly use this issue to access sensitive information. (CVE-2019-13636)
It was discovered that Patch incorrectly handled certain files. An attacker could possibly use this issue to execute arbitrary code. (CVE-2019-13638)
- Record
USN-4071-1- Updated
- 2026-11-02
OSVUSN-4071-2 No score
patch vulnerabilities
USN-4071-1 fixed several vulnerabilities in Patch. This update provides the corresponding update for Ubuntu 14.04 ESM.
Original advisory details:
It was discovered that Patch incorrectly handled certain files. An attacker could possibly use this issue to access sensitive information. (CVE-2019-13636)
It was discovered that Patch incorrectly handled certain files. An attacker could possibly use this issue to execute arbitrary code. (CVE-2019-13638)
- Record
USN-4071-2- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
patchAlpine:v3.10 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.11 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.12 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.13 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.14 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.15 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.16 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.17 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.18 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.19 |
before 2.7.6-r6 | 2.7.6-r6 |
Show 49 moreShow less
| Package | Affected | Fixed |
|---|---|---|
patchAlpine:v3.20 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.21 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.22 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.23 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.24 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAlpine:v3.7 |
before 2.7.6-r0 | 2.7.6-r0 |
patchAlpine:v3.8 |
before 2.7.6-r4 | 2.7.6-r4 |
patchAlpine:v3.9 |
before 2.7.6-r6 | 2.7.6-r6 |
patchAzure Linux:3 |
before 2.7.6-9 | 2.7.6-9 |
patchAzure Linux:2 |
before 2.7.6-7 | 2.7.6-7 |
patchDebian:12 |
before 2.7.6-5 | 2.7.6-5 |
patchDebian:13 |
before 2.7.6-5 | 2.7.6-5 |
patchDebian:14 |
before 2.7.6-5 | 2.7.6-5 |
patchDebian:8 From an advisory covering 2 CVEs |
before 2.7.5-1+deb8u3, plus listed versions 2.7.5-12.7.5-1+deb8u12.7.5-1+deb8u2 |
2.7.5-1+deb8u3 |
patchDebian:9 From an advisory covering 3 CVEs |
before 2.7.5-1+deb9u2, plus listed versions 2.7.5-12.7.5-1+deb9u1 |
2.7.5-1+deb9u2 |
patchDebian:10 From an advisory covering 3 CVEs |
before 2.7.6-3+deb10u1, plus listed versions 2.7.6-3 |
2.7.6-3+deb10u1 |
patch_jllJulia |
before 2.8.0+0 | 2.8.0+0 |
patchMageia:7 From an advisory covering 3 CVEs |
before 2.7.6-4.1.mga7 | 2.7.6-4.1.mga7 |
patchRed Hat:enterprise_linux:8::baseos From an advisory covering 2 CVEs |
before 0:2.7.6-9.el8_0 | 0:2.7.6-9.el8_0 |
patch-debuginfoRed Hat:enterprise_linux:8::baseos From an advisory covering 2 CVEs |
before 0:2.7.6-9.el8_0 | 0:2.7.6-9.el8_0 |
patch-debugsourceRed Hat:enterprise_linux:8::baseos From an advisory covering 2 CVEs |
before 0:2.7.6-9.el8_0 | 0:2.7.6-9.el8_0 |
patchRed Hat:enterprise_linux:7::client From an advisory covering 2 CVEs |
before 0:2.7.1-12.el7_7 | 0:2.7.1-12.el7_7 |
patch-debuginfoRed Hat:enterprise_linux:7::client From an advisory covering 2 CVEs |
before 0:2.7.1-12.el7_7 | 0:2.7.1-12.el7_7 |
patchRed Hat:enterprise_linux:7::computenode From an advisory covering 2 CVEs |
before 0:2.7.1-12.el7_7 | 0:2.7.1-12.el7_7 |
patch-debuginfoRed Hat:enterprise_linux:7::computenode From an advisory covering 2 CVEs |
before 0:2.7.1-12.el7_7 | 0:2.7.1-12.el7_7 |
patchRed Hat:enterprise_linux:7::server From an advisory covering 2 CVEs |
before 0:2.7.1-12.el7_7 | 0:2.7.1-12.el7_7 |
patch-debuginfoRed Hat:enterprise_linux:7::server From an advisory covering 2 CVEs |
before 0:2.7.1-12.el7_7 | 0:2.7.1-12.el7_7 |
patchRed Hat:enterprise_linux:7::workstation From an advisory covering 2 CVEs |
before 0:2.7.1-12.el7_7 | 0:2.7.1-12.el7_7 |
patch-debuginfoRed Hat:enterprise_linux:7::workstation From an advisory covering 2 CVEs |
before 0:2.7.1-12.el7_7 | 0:2.7.1-12.el7_7 |
patchRed Hat:rhel_eus:7.5::computenode From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_5 | 0:2.7.1-11.el7_5 |
patch-debuginfoRed Hat:rhel_eus:7.5::computenode From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_5 | 0:2.7.1-11.el7_5 |
patchRed Hat:rhel_eus:7.5::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_5 | 0:2.7.1-11.el7_5 |
patch-debuginfoRed Hat:rhel_eus:7.5::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_5 | 0:2.7.1-11.el7_5 |
patchRed Hat:rhel_eus:7.6::computenode From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_6 | 0:2.7.1-11.el7_6 |
patch-debuginfoRed Hat:rhel_eus:7.6::computenode From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_6 | 0:2.7.1-11.el7_6 |
patchRed Hat:rhel_eus:7.6::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_6 | 0:2.7.1-11.el7_6 |
patch-debuginfoRed Hat:rhel_eus:7.6::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_6 | 0:2.7.1-11.el7_6 |
patchRed Hat:rhel_aus:7.4::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_4 | 0:2.7.1-11.el7_4 |
patch-debuginfoRed Hat:rhel_aus:7.4::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_4 | 0:2.7.1-11.el7_4 |
patchRed Hat:rhel_e4s:7.4::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_4 | 0:2.7.1-11.el7_4 |
patch-debuginfoRed Hat:rhel_e4s:7.4::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_4 | 0:2.7.1-11.el7_4 |
patchRed Hat:rhel_tus:7.4::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_4 | 0:2.7.1-11.el7_4 |
patch-debuginfoRed Hat:rhel_tus:7.4::server From an advisory covering 2 CVEs |
before 0:2.7.1-11.el7_4 | 0:2.7.1-11.el7_4 |
patchUbuntu:Pro:14.04:LTS |
before 2.7.1-4ubuntu2.4+esm1, plus listed versions 2.7.1-32.7.1-42.7.1-4ubuntu12.7.1-4ubuntu22.7.1-4ubuntu2.32.7.1-4ubuntu2.4 |
2.7.1-4ubuntu2.4+esm1 |
patchUbuntu:16.04:LTS |
before 2.7.5-1ubuntu0.16.04.2, plus listed versions 2.7.5-12.7.5-1ubuntu0.16.04.1 |
2.7.5-1ubuntu0.16.04.2 |
patchUbuntu:18.04:LTS |
before 2.7.6-2ubuntu1.1, plus listed versions 2.7.5-1build12.7.6-12.7.6-2ubuntu1 |
2.7.6-2ubuntu1.1 |
patchUbuntu:16.04:LTS From an advisory covering 2 CVEs |
before 2.7.5-1ubuntu0.16.04.2, plus listed versions 2.7.5-12.7.5-1ubuntu0.16.04.1 |
2.7.5-1ubuntu0.16.04.2 |
patchUbuntu:18.04:LTS From an advisory covering 2 CVEs |
before 2.7.6-2ubuntu1.1, plus listed versions 2.7.5-1build12.7.6-12.7.6-2ubuntu1 |
2.7.6-2ubuntu1.1 |
patchUbuntu:Pro:14.04:LTS From an advisory covering 2 CVEs |
before 2.7.1-4ubuntu2.4+esm1, plus listed versions 2.7.1-32.7.1-42.7.1-4ubuntu12.7.1-4ubuntu22.7.1-4ubuntu2.32.7.1-4ubuntu2.4 |
2.7.1-4ubuntu2.4+esm1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| facts | OSV | |
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2019-13638 is a high vulnerability (CVSS 7.8) in Gnu Patch, published July 22, 2019. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 4.49%, the 91st percentile. Fixed in patch 2.7.6-r6.
References
security-tracker.debian.org/tracker/CVE-2019-13638
git.savannah.gnu.org/cgit/patch.git/commit?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0
debian.org/security/2019/dsa-4489
seclists.org/bugtraq/2019/Jul/54
seclists.org/bugtraq/2019/Aug/29
packetstormsecurity.com/files/154124/GNU-patch-Command-Injection-Directory-Traversal.html
Show 33 moreShow less
security.gentoo.org/glsa/201908-22
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SVWWGISFWACROJJPVJJL4UBLVZ7LPOLT
security.netapp.com/advisory/ntap-20190828-0001
github.com/irsl/gnu-patch-vulnerabilities
access.redhat.com/errata/RHSA-2019:2798
access.redhat.com/errata/RHSA-2019:2964
access.redhat.com/errata/RHSA-2019:3757
access.redhat.com/errata/RHSA-2019:3758
access.redhat.com/errata/RHSA-2019:4061
nvd.nist.gov/vuln/detail/CVE-2019-13638
github.com/advisories/GHSA-vqpq-8jvg-rwmx
security.alpinelinux.org/vuln/CVE-2019-13638
docs.bell-sw.com/security/cves/CVE-2019-13638
advisories.mageia.org/MGASA-2020-0093.html
bugs.mageia.org/show_bug.cgi?id=25279
lists.fedoraproject.org/archives/list/[email protected]/thread/SVWWGISFWACROJJPVJJL4UBLVZ7LPOLT
access.redhat.com/security/updates/classification
bugzilla.redhat.com/show_bug.cgi?id=1733916
bugzilla.redhat.com/show_bug.cgi?id=1746672
security.access.redhat.com/data/csaf/v2/advisories/2019/rhsa-2019_2798.json
access.redhat.com/security/cve/CVE-2018-20969
cve.org/CVERecord?id=CVE-2018-20969
nvd.nist.gov/vuln/detail/CVE-2018-20969
access.redhat.com/security/cve/CVE-2019-13638
cve.org/CVERecord?id=CVE-2019-13638
security.access.redhat.com/data/csaf/v2/advisories/2019/rhsa-2019_2964.json
security.access.redhat.com/data/csaf/v2/advisories/2019/rhsa-2019_3757.json
security.access.redhat.com/data/csaf/v2/advisories/2019/rhsa-2019_3758.json
security.access.redhat.com/data/csaf/v2/advisories/2019/rhsa-2019_4061.json
ubuntu.com/security/CVE-2019-13638
ubuntu.com/security/notices/USN-4071-1
ubuntu.com/security/notices/USN-4071-2
ubuntu.com/security/CVE-2019-13636