CVE-2019-13636
In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than...
In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than input files. This affects inp.c and util.c.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
5.9
In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than input files. This affects inp.c and util.c.
- Record
CVE-2019-13636- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - CVSS 2.0
- 5.8 Medium
AV:N/AC:M/Au:N/C:N/I:P/A:P - Weakness
- CWE-59
- Updated
- 2026-11-02
CVE List No score
In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than input files. This affects inp.c and util.c.
- Record
CVE-2019-13636- Updated
- 2026-11-02
EUVDEUVD-2019-5064 No score
In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than input files. This affects inp.c and util.c.
- Record
EUVD-2019-5064- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-f3xm-hqch-mq3q
5.9
In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than...
In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than input files. This affects inp.c and util.c.
- Record
GHSA-f3xm-hqch-mq3q- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Weakness
- CWE-59
- Updated
- 2026-11-02
OSVALPINE-CVE-2019-13636
5.9
In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than input files. This affects inp.c and util.c.
- Record
ALPINE-CVE-2019-13636- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVAZL-35105
5.9
CVE-2019-13636 affecting package patch for versions less than 2.7.6-9
In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than input files. This affects inp.c and util.c.
- Record
AZL-35105- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-05
Show 15 moreShow less
OSVAZL-6789
5.9
CVE-2019-13636 affecting package patch for versions less than 2.7.6-7
In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than input files. This affects inp.c and util.c.
- Record
AZL-6789- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVBELL-CVE-2019-13636
5.9
CVE-2019-13636 does not affect BellSoft software
- Record
BELL-CVE-2019-13636- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSV
5.9
In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than input files. This affects inp.c and util.c.
- Record
CVE-2019-13636- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2019-13636
5.9
In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than input files. This affects inp.c and util.c.
- Record
DEBIAN-CVE-2019-13636- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVJLSEC-2026-16
5.9
In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than input files. This affects inp.c and util.c.
- Record
JLSEC-2026-16- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - CVSS 2.0
- 5.8 Medium
AV:N/AC:M/Au:N/C:N/I:P/A:P - Updated
- 2026-11-02
OSVRHSA-2020:1852
5.9
Red Hat Security Advisory: patch security and bug fix update
- Record
RHSA-2020:1852- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVRLSA-2020:1852
5.9
Moderate: patch security and bug fix update
The patch program applies diff files to originals. The diff command is used to compare an original to a changed file. Diff lists the changes made to the file. A person who has the original file can then use the patch command with the diff file to add the changes to their original file (patching the file).
Security Fix(es):
- patch: the following of symlinks in inp.c and util.c is mishandled in cases other than input files (CVE-2019-13636)
For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.
Additional Changes:
For detailed information on changes in this release, see the Rocky Linux 8.2 Release Notes linked from the References section.
- Record
RLSA-2020:1852- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2019-13636
5.9
In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than input files. This affects inp.c and util.c.
- Record
UBUNTU-CVE-2019-13636- CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVALSA-2020:1852 No score
Moderate: patch security and bug fix update
The patch program applies diff files to originals. The diff command is used to compare an original to a changed file. Diff lists the changes made to the file. A person who has the original file can then use the patch command with the diff file to add the changes to their original file (patching the file).
Security Fix(es):
- patch: the following of symlinks in inp.c and util.c is mishandled in cases other than input files (CVE-2019-13636)
For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.
Additional Changes:
For detailed information on changes in this release, see the AlmaLinux Release Notes linked from the References section.
- Record
ALSA-2020:1852- 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
OSVopenSUSE-SU-2024:12060-1 No score
patch-2.7.6-5.1 on GA media
These are all security issues fixed in the patch-2.7.6-5.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:12060-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:1925-1 No score
Security update for patch
This update for patch fixes the following issues:
Security issues fixed:
- CVE-2019-13636: Fixed follow symlinks unless --follow-symlinks is given. This increases the security against malicious patches (bsc#1142041).
- CVE-2018-6952: Fixed swapping fakelines in pch_swap. This bug was causing a double free leading to a crash (bsc#1080985).
Bugfixes:
- Abort when cleaning up fails. This bug could cause an infinite loop when a patch wouldn't apply, leading to a segmentation fault (bsc#1111572).
- Pass the correct stat to backup files. This bug would occasionally cause backup files to be missing when all hunks failed to apply (bsc#1198106).
- Record
SUSE-SU-2022:1925-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:1932-1 No score
Security update for patch
This update for patch fixes the following issues:
Security fixes:
- CVE-2019-13636: Fixed mishandled following of symlinks in certain cases other than input files (bsc#1142041).
- CVE-2018-6952: Fixed double free of memory in pch.c:another_hunk() (bsc#1080985).
Bugfixes:
- Pass the correct stat to backup files (bsc#1198106).
- Fix temporary file leak when applying ed-style patches (bsc#1092500).
- Record
SUSE-SU-2022:1932-1- 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-r5 | 2.7.6-r5 |
patchAlpine:v3.11 |
before 2.7.6-r5 | 2.7.6-r5 |
patchAlpine:v3.12 |
before 2.7.6-r5 | 2.7.6-r5 |
patchAlpine:v3.13 |
before 2.7.6-r5 | 2.7.6-r5 |
patchAlpine:v3.14 |
before 2.7.6-r5 | 2.7.6-r5 |
patchAlpine:v3.15 |
before 2.7.6-r5 | 2.7.6-r5 |
patchAlpine:v3.16 |
before 2.7.6-r5 | 2.7.6-r5 |
patchAlpine:v3.17 |
before 2.7.6-r5 | 2.7.6-r5 |
patchAlpine:v3.18 |
before 2.7.6-r5 | 2.7.6-r5 |
patchAlpine:v3.19 |
before 2.7.6-r5 | 2.7.6-r5 |
Show 36 moreShow less
| Package | Affected | Fixed |
|---|---|---|
patchAlpine:v3.20 |
before 2.7.6-r5 | 2.7.6-r5 |
patchAlpine:v3.21 |
before 2.7.6-r5 | 2.7.6-r5 |
patchAlpine:v3.22 |
before 2.7.6-r5 | 2.7.6-r5 |
patchAlpine:v3.23 |
before 2.7.6-r5 | 2.7.6-r5 |
patchAlpine:v3.24 |
before 2.7.6-r5 | 2.7.6-r5 |
patchAlpine:v3.7 |
before 2.7.5-r3 | 2.7.5-r3 |
patchAlpine:v3.8 |
before 2.7.6-r3 | 2.7.6-r3 |
patchAlpine:v3.9 |
before 2.7.6-r5 | 2.7.6-r5 |
patchAlmaLinux:8 |
before 2.7.6-11.el8 | 2.7.6-11.el8 |
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 |
before 2.7.5-1+deb8u2, plus listed versions 2.7.5-12.7.5-1+deb8u1 |
2.7.5-1+deb8u2 |
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 |
before 0:2.7.6-11.el8 | 0:2.7.6-11.el8 |
patch-debuginfoRed Hat:enterprise_linux:8::baseos |
before 0:2.7.6-11.el8 | 0:2.7.6-11.el8 |
patch-debugsourceRed Hat:enterprise_linux:8::baseos |
before 0:2.7.6-11.el8 | 0:2.7.6-11.el8 |
patchRocky Linux:8 |
before 0:2.7.6-11.el8 | 0:2.7.6-11.el8 |
patchSUSE:Linux Enterprise Module for Basesystem 15 SP3 From an advisory covering 2 CVEs |
before 2.7.6-150000.5.3.1 | 2.7.6-150000.5.3.1 |
patchSUSE:Linux Enterprise Module for Basesystem 15 SP4 From an advisory covering 2 CVEs |
before 2.7.6-150000.5.3.1 | 2.7.6-150000.5.3.1 |
patchopenSUSE:Leap 15.3 From an advisory covering 2 CVEs |
before 2.7.6-150000.5.3.1 | 2.7.6-150000.5.3.1 |
patchopenSUSE:Leap 15.4 From an advisory covering 2 CVEs |
before 2.7.6-150000.5.3.1 | 2.7.6-150000.5.3.1 |
patchSUSE:Linux Enterprise Server 12 SP5 From an advisory covering 2 CVEs |
before 2.7.5-8.8.1 | 2.7.5-8.8.1 |
patchSUSE:Linux Enterprise Server for SAP Applications 12 SP5 From an advisory covering 2 CVEs |
before 2.7.5-8.8.1 | 2.7.5-8.8.1 |
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 |
patchopenSUSE:Tumbleweed From an advisory covering 2 CVEs |
before 2.7.6-5.1 | 2.7.6-5.1 |
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-13636 is a medium vulnerability (CVSS 5.9) in Gnu Patch, published July 17, 2019. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 3.90%, the 90th percentile. Fixed in patch 2.7.6-r5.
References
git.savannah.gnu.org/cgit/patch.git/commit?id=dce4683cbbe107a95f1f0d45fabc304acfb5d71a
lists.debian.org/debian-lts-announce/2019/07/msg00016.html
usn.ubuntu.com/4071-1
usn.ubuntu.com/4071-2
debian.org/security/2019/dsa-4489
seclists.org/bugtraq/2019/Jul/54
Show 38 moreShow less
seclists.org/bugtraq/2019/Aug/29
packetstormsecurity.com/files/154124/GNU-patch-Command-Injection-Directory-Traversal.html
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
nvd.nist.gov/vuln/detail/CVE-2019-13636
github.com/advisories/GHSA-f3xm-hqch-mq3q
security.alpinelinux.org/vuln/CVE-2019-13636
errata.almalinux.org/8/ALSA-2020-1852.html
vulners.com/cve/CVE-2019-13636
docs.bell-sw.com/security/cves/CVE-2019-13636
security-tracker.debian.org/tracker/CVE-2019-13636
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/errata/RHSA-2019:2798
access.redhat.com/errata/RHSA-2020:1852
access.redhat.com/security/updates/classification
access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/8.2_release_notes/index
bugzilla.redhat.com/show_bug.cgi?id=1732781
security.access.redhat.com/data/csaf/v2/advisories/2020/rhsa-2020_1852.json
access.redhat.com/security/cve/CVE-2019-13636
cve.org/CVERecord?id=CVE-2019-13636
errata.rockylinux.org/RLSA-2020:1852
suse.com/support/update/announcement/2022/suse-su-20221925-1
bugzilla.suse.com/1080985
bugzilla.suse.com/1111572
bugzilla.suse.com/1142041
bugzilla.suse.com/1198106
suse.com/security/cve/CVE-2018-6952
suse.com/security/cve/CVE-2019-13636
suse.com/support/update/announcement/2022/suse-su-20221932-1
bugzilla.suse.com/1092500
ubuntu.com/security/CVE-2019-13636
ubuntu.com/security/notices/USN-4071-1
ubuntu.com/security/notices/USN-4071-2
ubuntu.com/security/CVE-2019-13638