Every CVE Search/ Get API key

CVE-2019-13636

In GNU patch through 2.7.6, the following of symlinks is mishandled in certain cases other than...

5.9 MediumFix available

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

3.90%Up 1.2 points since Apr 14, 2021
90%50%10%1%

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 MediumCVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
CVSS 2.0
5.8 MediumAV: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
CVSS 2.0
5.8 MediumAV: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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

Affected packages
PackageAffectedFixed
patch
Alpine:v3.10
before 2.7.6-r5
2.7.6-r5
patch
Alpine:v3.11
before 2.7.6-r5
2.7.6-r5
patch
Alpine:v3.12
before 2.7.6-r5
2.7.6-r5
patch
Alpine:v3.13
before 2.7.6-r5
2.7.6-r5
patch
Alpine:v3.14
before 2.7.6-r5
2.7.6-r5
patch
Alpine:v3.15
before 2.7.6-r5
2.7.6-r5
patch
Alpine:v3.16
before 2.7.6-r5
2.7.6-r5
patch
Alpine:v3.17
before 2.7.6-r5
2.7.6-r5
patch
Alpine:v3.18
before 2.7.6-r5
2.7.6-r5
patch
Alpine:v3.19
before 2.7.6-r5
2.7.6-r5
Show 36 moreShow less
Affected packages
PackageAffectedFixed
patch
Alpine:v3.20
before 2.7.6-r5
2.7.6-r5
patch
Alpine:v3.21
before 2.7.6-r5
2.7.6-r5
patch
Alpine:v3.22
before 2.7.6-r5
2.7.6-r5
patch
Alpine:v3.23
before 2.7.6-r5
2.7.6-r5
patch
Alpine:v3.24
before 2.7.6-r5
2.7.6-r5
patch
Alpine:v3.7
before 2.7.5-r3
2.7.5-r3
patch
Alpine:v3.8
before 2.7.6-r3
2.7.6-r3
patch
Alpine:v3.9
before 2.7.6-r5
2.7.6-r5
patch
AlmaLinux:8
before 2.7.6-11.el8
2.7.6-11.el8
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-5
2.7.6-5
patch
Debian:13
before 2.7.6-5
2.7.6-5
patch
Debian:14
before 2.7.6-5
2.7.6-5
patch
Debian:8
before 2.7.5-1+deb8u2, plus listed versions
2.7.5-12.7.5-1+deb8u1
2.7.5-1+deb8u2
patch
Debian: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
patch
Debian: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_jll
Julia
before 2.8.0+0
2.8.0+0
patch
Mageia:7
From an advisory covering 3 CVEs
before 2.7.6-4.1.mga7
2.7.6-4.1.mga7
patch
Red Hat:enterprise_linux:8::baseos
before 0:2.7.6-11.el8
0:2.7.6-11.el8
patch-debuginfo
Red Hat:enterprise_linux:8::baseos
before 0:2.7.6-11.el8
0:2.7.6-11.el8
patch-debugsource
Red Hat:enterprise_linux:8::baseos
before 0:2.7.6-11.el8
0:2.7.6-11.el8
patch
Rocky Linux:8
before 0:2.7.6-11.el8
0:2.7.6-11.el8
patch
SUSE: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
patch
SUSE: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
patch
openSUSE:Leap 15.3
From an advisory covering 2 CVEs
before 2.7.6-150000.5.3.1
2.7.6-150000.5.3.1
patch
openSUSE:Leap 15.4
From an advisory covering 2 CVEs
before 2.7.6-150000.5.3.1
2.7.6-150000.5.3.1
patch
SUSE:Linux Enterprise Server 12 SP5
From an advisory covering 2 CVEs
before 2.7.5-8.8.1
2.7.5-8.8.1
patch
SUSE: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
patch
Ubuntu: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
patch
Ubuntu: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
patch
Ubuntu: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
patch
Ubuntu: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
patch
Ubuntu: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
patch
Ubuntu: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
patch
openSUSE:Tumbleweed
From an advisory covering 2 CVEs
before 2.7.6-5.1
2.7.6-5.1

History

History
RecordedChangedSources
affected
factsOSV
aliasesEUVD
first indexedCVE 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

Show 38 moreShow less
MoveEnter Open