9.3
HIGH CVSS 2.0
CVE-2019-13638
Patch GNU Command Injection Vulnerability
Description

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.

INFO

Published Date :

July 26, 2019, 1:15 p.m.

Last Modified :

Nov. 21, 2024, 4:25 a.m.

Remotely Exploit :

Yes !
Affected Products

The following products are affected by CVE-2019-13638 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Debian debian_linux
1 Gnu patch
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 2.0 HIGH [email protected]
CVSS 3.0 HIGH [email protected]
Solution
This vulnerability can be remediated by updating the affected patch packages.
  • Update the patch packages to address this vulnerability.
  • Consult vendor guidance for specific patch installation.
Public PoC/Exploit Available at Github

CVE-2019-13638 has a 2 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2019-13638.

URL Resource
http://packetstormsecurity.com/files/154124/GNU-patch-Command-Injection-Directory-Traversal.html
https://access.redhat.com/errata/RHSA-2019:2798
https://access.redhat.com/errata/RHSA-2019:2964
https://access.redhat.com/errata/RHSA-2019:3757
https://access.redhat.com/errata/RHSA-2019:3758
https://access.redhat.com/errata/RHSA-2019:4061
https://git.savannah.gnu.org/cgit/patch.git/commit/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0 Mailing List Patch Vendor Advisory
https://github.com/irsl/gnu-patch-vulnerabilities
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SVWWGISFWACROJJPVJJL4UBLVZ7LPOLT/
https://seclists.org/bugtraq/2019/Aug/29
https://seclists.org/bugtraq/2019/Jul/54 Mailing List Third Party Advisory
https://security-tracker.debian.org/tracker/CVE-2019-13638 Third Party Advisory
https://security.gentoo.org/glsa/201908-22
https://security.netapp.com/advisory/ntap-20190828-0001/
https://www.debian.org/security/2019/dsa-4489 Third Party Advisory
http://packetstormsecurity.com/files/154124/GNU-patch-Command-Injection-Directory-Traversal.html
https://access.redhat.com/errata/RHSA-2019:2798
https://access.redhat.com/errata/RHSA-2019:2964
https://access.redhat.com/errata/RHSA-2019:3757
https://access.redhat.com/errata/RHSA-2019:3758
https://access.redhat.com/errata/RHSA-2019:4061
https://git.savannah.gnu.org/cgit/patch.git/commit/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0 Mailing List Patch Vendor Advisory
https://github.com/irsl/gnu-patch-vulnerabilities
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SVWWGISFWACROJJPVJJL4UBLVZ7LPOLT/
https://seclists.org/bugtraq/2019/Aug/29
https://seclists.org/bugtraq/2019/Jul/54 Mailing List Third Party Advisory
https://security-tracker.debian.org/tracker/CVE-2019-13638 Third Party Advisory
https://security.gentoo.org/glsa/201908-22
https://security.netapp.com/advisory/ntap-20190828-0001/
https://www.debian.org/security/2019/dsa-4489 Third Party Advisory
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2019-13638 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Investigating Why AI Detects SARD but Misses CVEs

C C++ CMake Shell Makefile TeX HTML Perl VBScript Batchfile

Updated: 1 month, 1 week ago
4 stars 7 fork 7 watcher
Born at : April 25, 2025, 7:21 a.m. This repo has been linked 11 different CVEs too.

The GNU patch utility was prone vulnerable to multiple attacks through version 2.7.6. You can find my related PoC files here.

Updated: 4 years, 1 month ago
5 stars 0 fork 0 watcher
Born at : Aug. 16, 2019, 6:03 a.m. This repo has been linked 4 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2019-13638 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2019-13638 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference http://packetstormsecurity.com/files/154124/GNU-patch-Command-Injection-Directory-Traversal.html
    Added Reference https://access.redhat.com/errata/RHSA-2019:2798
    Added Reference https://access.redhat.com/errata/RHSA-2019:2964
    Added Reference https://access.redhat.com/errata/RHSA-2019:3757
    Added Reference https://access.redhat.com/errata/RHSA-2019:3758
    Added Reference https://access.redhat.com/errata/RHSA-2019:4061
    Added Reference https://git.savannah.gnu.org/cgit/patch.git/commit/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0
    Added Reference https://github.com/irsl/gnu-patch-vulnerabilities
    Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SVWWGISFWACROJJPVJJL4UBLVZ7LPOLT/
    Added Reference https://seclists.org/bugtraq/2019/Aug/29
    Added Reference https://seclists.org/bugtraq/2019/Jul/54
    Added Reference https://security.gentoo.org/glsa/201908-22
    Added Reference https://security.netapp.com/advisory/ntap-20190828-0001/
    Added Reference https://security-tracker.debian.org/tracker/CVE-2019-13638
    Added Reference https://www.debian.org/security/2019/dsa-4489
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    Nov. 07, 2023

    Action Type Old Value New Value
    Added Reference MITRE https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SVWWGISFWACROJJPVJJL4UBLVZ7LPOLT/ [No types assigned]
    Removed Reference MITRE https://lists.fedoraproject.org/archives/list/[email protected]/message/SVWWGISFWACROJJPVJJL4UBLVZ7LPOLT/
  • CVE Modified by [email protected]

    Dec. 03, 2019

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2019:4061 [No Types Assigned]
    Added Reference https://access.redhat.com/errata/RHSA-2019:3758 [No Types Assigned]
  • CVE Modified by [email protected]

    Nov. 06, 2019

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2019:3757 [No Types Assigned]
  • CVE Modified by [email protected]

    Oct. 03, 2019

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2019:2964 [No Types Assigned]
  • CVE Modified by [email protected]

    Sep. 19, 2019

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2019:2798 [No Types Assigned]
  • CVE Modified by [email protected]

    Sep. 05, 2019

    Action Type Old Value New Value
    Added Reference https://github.com/irsl/gnu-patch-vulnerabilities [No Types Assigned]
  • CVE Modified by [email protected]

    Aug. 28, 2019

    Action Type Old Value New Value
    Added Reference https://security.netapp.com/advisory/ntap-20190828-0001/ [No Types Assigned]
  • CVE Modified by [email protected]

    Aug. 23, 2019

    Action Type Old Value New Value
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/SVWWGISFWACROJJPVJJL4UBLVZ7LPOLT/ [No Types Assigned]
  • CVE Modified by [email protected]

    Aug. 18, 2019

    Action Type Old Value New Value
    Added Reference https://security.gentoo.org/glsa/201908-22 [No Types Assigned]
  • CVE Modified by [email protected]

    Aug. 16, 2019

    Action Type Old Value New Value
    Added Reference http://packetstormsecurity.com/files/154124/GNU-patch-Command-Injection-Directory-Traversal.html [No Types Assigned]
  • CVE Modified by [email protected]

    Aug. 16, 2019

    Action Type Old Value New Value
    Added Reference https://seclists.org/bugtraq/2019/Aug/29 [No Types Assigned]
  • Initial Analysis by [email protected]

    Aug. 05, 2019

    Action Type Old Value New Value
    Added CVSS V2 Metadata Victim must voluntarily interact with attack mechanism
    Added CVSS V2 (AV:N/AC:M/Au:N/C:C/I:C/A:C)
    Added CVSS V3 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
    Changed Reference Type https://git.savannah.gnu.org/cgit/patch.git/commit/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0 No Types Assigned https://git.savannah.gnu.org/cgit/patch.git/commit/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0 Mailing List, Patch, Vendor Advisory
    Changed Reference Type https://seclists.org/bugtraq/2019/Jul/54 No Types Assigned https://seclists.org/bugtraq/2019/Jul/54 Mailing List, Third Party Advisory
    Changed Reference Type https://security-tracker.debian.org/tracker/CVE-2019-13638 No Types Assigned https://security-tracker.debian.org/tracker/CVE-2019-13638 Third Party Advisory
    Changed Reference Type https://www.debian.org/security/2019/dsa-4489 No Types Assigned https://www.debian.org/security/2019/dsa-4489 Third Party Advisory
    Added CWE CWE-78
    Added CPE Configuration OR *cpe:2.3:a:gnu:patch:2.7.6:*:*:*:*:*:*:*
    Added CPE Configuration OR *cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:* *cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* *cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
  • CVE Modified by [email protected]

    Jul. 30, 2019

    Action Type Old Value New Value
    Added Reference https://seclists.org/bugtraq/2019/Jul/54 [No Types Assigned]
  • CVE Modified by [email protected]

    Jul. 27, 2019

    Action Type Old Value New Value
    Added Reference https://www.debian.org/security/2019/dsa-4489 [No Types Assigned]
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Vulnerability Scoring Details
Base CVSS Score: 7.8
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact
Base CVSS Score: 9.3
Access Vector
Access Complexity
Authentication
Confidentiality Impact
Integrity Impact
Availability Impact
Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

3.29 }} -0.16%

score

0.86677

percentile