CVE-2019-13636
published 2019-07-17CVE-2019-13636: 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.
PriorityP433medium5.9CVSS 3.0
AVNACHPRNUINSUCNIHAN
EPSS
3.90%
89.2th percentile
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.
Affected
26 ranges· showing 25
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | patch | < patch 2.7.6-5 (bookworm) | patch 2.7.6-5 (bookworm) |
| gnu | patch | <= 2.7.6 | — |
| gnu | patch | >= 0 < 2.7.6-5 | 2.7.6-5 |
| gnu | patch | >= 0 < 2.7.6-5 | 2.7.6-5 |
| gnu | patch | >= 0 < 2.7.6-5 | 2.7.6-5 |
| gnu | patch | >= 0 < 2.7.6-5 | 2.7.6-5 |
| gnu | patch | >= 0 < 2.7.5-1ubuntu0.16.04.2 | 2.7.5-1ubuntu0.16.04.2 |
| gnu | patch | >= 0 < 2.7.6-2ubuntu1.1 | 2.7.6-2ubuntu1.1 |
| gnu | patch | >= 0 < 2.7.1-4ubuntu2.4+esm1 | 2.7.1-4ubuntu2.4+esm1 |
| msrc | azl3_patch_2.7.6-9_on_azure_linux_3.0 | — | — |
| msrc | cbl2_patch_2.7.6-7_on_cbl_mariner_2.0 | — | — |
| msrc | cbl_mariner_1.0_arm | — | — |
| msrc | cbl_mariner_1.0_x64 | — | — |
| msrc | cbl_mariner_2.0_arm | — | — |
| msrc | cbl_mariner_2.0_x64 | — | — |
| msrc | cm1_patch_2.7.6-7_on_cbl_mariner_1.0 | — | — |
| msrc | patch-2.7.6-7.cm1.aarch64.rpm_on_cbl_mariner_1.0_arm | — | — |
| msrc | patch-2.7.6-7.cm1.x86_64.rpm_on_cbl_mariner_1.0_x64 | — | — |
| msrc | patch-2.7.6-7.cm2.aarch64.rpm_on_cbl_mariner_2.0_arm | — | — |
| msrc | patch-2.7.6-7.cm2.x86_64.rpm_on_cbl_mariner_2.0_x64 | — | — |
| msrc | patch-2.7.6-9.azl3.aarch64.rpm_on_azure_linux_3.0_arm | — | — |
| msrc | patch-2.7.6-9.azl3.x86_64.rpm_on_azure_linux_3.0_x64 | — | — |
| msrc | patch-debuginfo-2.7.6-7.cm1.aarch64.rpm_on_cbl_mariner_1.0_arm | — | — |
| msrc | patch-debuginfo-2.7.6-7.cm1.x86_64.rpm_on_cbl_mariner_1.0_x64 | — | — |
| msrc | patch-debuginfo-2.7.6-7.cm2.aarch64.rpm_on_cbl_mariner_2.0_arm | — | — |
CVSS provenance
nvdv3.05.9MEDIUMCVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
nvdv2.05.8MEDIUMAV:N/AC:M/Au:N/C:N/I:P/A:P
osv5.9MEDIUM
vendor_debian5.9MEDIUM
vendor_msrc5.9MEDIUM
vendor_redhat5.9MEDIUM
vendor_ubuntu5.9MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
GHSA-f3xm-hqch-mq3q: In GNU patch through 2
ghsa_unreviewed·2022-05-24
CVE-2019-13636 [MEDIUM] CWE-59 GHSA-f3xm-hqch-mq3q: In GNU patch through 2
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.
OSV
patch vulnerabilities
osv·2019-07-24·CVSS 5.9
CVE-2019-13636 [MEDIUM] patch vulnerabilities
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)
OSV
patch vulnerabilities
osv·2019-07-24·CVSS 5.9
CVE-2019-13636 [MEDIUM] patch vulnerabilities
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)
OSV
CVE-2019-13636: In GNU patch through 2
osv·2019-07-17·CVSS 5.9
CVE-2019-13636 [MEDIUM] CVE-2019-13636: In GNU patch through 2
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.
Ubuntu
Patch vulnerabilities
vendor_ubuntu·2019-07-24·CVSS 5.9
CVE-2019-13636 [MEDIUM] Patch vulnerabilities
Title: Patch vulnerabilities
Summary: Several security issues were fixed in Patch.
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)
Instructions: In general, a standard system update will make all the necessary changes.
Red Hat
patch: the following of symlinks in inp.c and util.c is mishandled in cases other than input files
vendor_redhat·2019-07-24·CVSS 5.9
CVE-2019-13636 [MEDIUM] CWE-59 patch: the following of symlinks in inp.c and util.c is mishandled in cases other than input files
patch: the following of symlinks in inp.c and util.c is mishandled in cases other than input files
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.
Package: patch (Red Hat Enterprise Linux 5) - Out of support scope
Package: patch (Red Hat Enterprise Linux 6) - Out of support scope
Package: patch (Red Hat Enterprise Linux 7) - Will not fix
Ubuntu
Patch vulnerabilities
vendor_ubuntu·2019-07-24·CVSS 5.9
CVE-2019-13636 [MEDIUM] Patch vulnerabilities
Title: Patch vulnerabilities
Summary: Several security issues were fixed in Patch.
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)
Instructions: In general, a standard system update will make all the necessary changes.
Microsoft
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.
vendor_msrc·2019-07-09·CVSS 5.9
CVE-2019-13636 [MEDIUM] CWE-59 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.
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.
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is identified, we will update the CVE to reflect this.
Mariner: Mariner
mitre: mitre
Custome
Debian
CVE-2019-13636: patch - In GNU patch through 2.7.6, the following of symlinks is mishandled in certain c...
vendor_debian·2019·CVSS 5.9
CVE-2019-13636 [MEDIUM] CVE-2019-13636: patch - In GNU patch through 2.7.6, the following of symlinks is mishandled in certain c...
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.
Scope: local
bookworm: resolved (fixed in 2.7.6-5)
bullseye: resolved (fixed in 2.7.6-5)
forky: resolved (fixed in 2.7.6-5)
sid: resolved (fixed in 2.7.6-5)
trixie: resolved (fixed in 2.7.6-5)
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2019-13636 patch: the following of symlinks in inp.c and util.c is mishandled in cases other than input files
bugzilla·2019-07-24·CVSS 5.9
CVE-2019-13636 [MEDIUM] CVE-2019-13636 patch: the following of symlinks in inp.c and util.c is mishandled in cases other than input files
CVE-2019-13636 patch: the following of symlinks in inp.c and util.c is mishandled in cases other than input files
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.
Upstream patch:
https://git.savannah.gnu.org/cgit/patch.git/commit/?id=dce4683cbbe107a95f1f0d45fabc304acfb5d71a
Discussion:
Created patch tracking bugs for this issue:
Affects: fedora-all [bug 1732842]
---
There is a flaw on patch package. When applying patch files patch application follows symlinks by default, even with no --follow-symlinks option being used. This can be used by an attacker to access other filesystem files other than the expected one via a crafted patch file.
---
This issue has been addressed in the following pro
Bugzilla
CVE-2019-13636 patch: the following of symlinks in inp.c and util.c is mishandled in cases other than input files [fedora-all]
bugzilla·2019-07-24·CVSS 5.9
CVE-2019-13636 [MEDIUM] CVE-2019-13636 patch: the following of symlinks in inp.c and util.c is mishandled in cases other than input files [fedora-all]
CVE-2019-13636 patch: the following of symlinks in inp.c and util.c is mishandled in cases other than input files [fedora-all]
This is an automatically created tracking bug! It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of fedora-all.
For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.
For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs
When submitting as an update, use the fedpkg template provided in the next
comment(s). This will include the bug IDs of this tracking bug as well as
the relevant top-level CVE bugs.
Please also mention the CVE IDs being fixed in the RPM changelog and the
fedpkg commit message.
NOT
http://packetstormsecurity.com/files/154124/GNU-patch-Command-Injection-Directory-Traversal.htmlhttps://git.savannah.gnu.org/cgit/patch.git/commit/?id=dce4683cbbe107a95f1f0d45fabc304acfb5d71ahttps://github.com/irsl/gnu-patch-vulnerabilitieshttps://lists.debian.org/debian-lts-announce/2019/07/msg00016.htmlhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SVWWGISFWACROJJPVJJL4UBLVZ7LPOLT/https://seclists.org/bugtraq/2019/Aug/29https://seclists.org/bugtraq/2019/Jul/54https://security.gentoo.org/glsa/201908-22https://security.netapp.com/advisory/ntap-20190828-0001/https://usn.ubuntu.com/4071-1/https://usn.ubuntu.com/4071-2/https://www.debian.org/security/2019/dsa-4489http://packetstormsecurity.com/files/154124/GNU-patch-Command-Injection-Directory-Traversal.htmlhttps://git.savannah.gnu.org/cgit/patch.git/commit/?id=dce4683cbbe107a95f1f0d45fabc304acfb5d71ahttps://github.com/irsl/gnu-patch-vulnerabilitieshttps://lists.debian.org/debian-lts-announce/2019/07/msg00016.htmlhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SVWWGISFWACROJJPVJJL4UBLVZ7LPOLT/https://seclists.org/bugtraq/2019/Aug/29https://seclists.org/bugtraq/2019/Jul/54https://security.gentoo.org/glsa/201908-22https://security.netapp.com/advisory/ntap-20190828-0001/https://usn.ubuntu.com/4071-1/https://usn.ubuntu.com/4071-2/https://www.debian.org/security/2019/dsa-4489
2019-07-17
Published