CVE-2019-13638
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.
What to do
Fixed builds are available from Alpine, Debian, Red Hat, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 18.04 | patch | Fixed | 2.7.6-2ubuntu1.1 | UBUNTU-CVE-2019-13638 |
| Ubuntu 16.04 | patch | Fixed | 2.7.5-1ubuntu0.16.04.2 | UBUNTU-CVE-2019-13638 |
| Ubuntu 14.04 | patch | Fix pending | 2.7.1-4ubuntu2.4+esm1 (Ubuntu Pro) | UBUNTU-CVE-2019-13638 |
| Debian 14 | patch | Fixed | 2.7.6-5 | DEBIAN-CVE-2019-13638 |
| Debian 13 | patch | Fixed | 2.7.6-5 | DEBIAN-CVE-2019-13638 |
| Debian 12 | patch | Fixed | 2.7.6-5 | DEBIAN-CVE-2019-13638 |
| Red Hat Enterprise Linux 8 | patch | Fixed | 0:2.7.6-9.el8_0 | RHSA-2019:2798 |
| Red Hat Enterprise Linux 7 | patch | Fixed | 0:2.7.1-12.el7_7 | RHSA-2019:2964 |
| Red Hat Enterprise Linux 6 | patch | Not affected | ||
| Red Hat Enterprise Linux 5 | patch | Will not fix Out of support scope | ||
| Alpine Linux 3.24 | patch | Fixed | 2.7.6-r6 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.23 | patch | Fixed | 2.7.6-r6 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.22 | patch | Fixed | 2.7.6-r6 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.21 | patch | Fixed | 2.7.6-r6 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.20 | patch | Fixed | 2.7.6-r6 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.19 | patch | Fixed | 2.7.6-r6 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.18 | patch | Fixed | 2.7.6-r6 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.17 | patch | Fixed | 2.7.6-r6 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.16 | patch | Fixed | 2.7.6-r6 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.15 | patch | Fixed | 2.7.6-r6 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.14 | patch | Fixed | 2.7.6-r6 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.13 | patch | Fixed | 2.7.6-r6 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.12 | patch | Fixed | 2.7.6-r6 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.11 | patch | Fixed | 2.7.6-r6 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.10 | patch | Fixed | 2.7.6-r6 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.9 | patch | Fixed | 2.7.6-r6 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.8 | patch | Fixed | 2.7.6-r4 | ALPINE-CVE-2019-13638 |
| Alpine Linux 3.7 | patch | Fixed | 2.7.6-r0 | ALPINE-CVE-2019-13638 |
What the vendor says
As published in the CVE record by mitre, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
Vendor advisories:
- https://www.debian.org/security/2019/dsa-4489 (vendor-advisory)
- https://security.gentoo.org/glsa/201908-22 (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2019:2798 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2019:2964 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2019:3757 (vendor-advisory)
References
- https://security-tracker.debian.org/tracker/CVE-2019-13638
- https://git.savannah.gnu.org/cgit/patch.git/commit/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0
- https://www.debian.org/security/2019/dsa-4489
- https://seclists.org/bugtraq/2019/Jul/54
- https://seclists.org/bugtraq/2019/Aug/29
- http://packetstormsecurity.com/files/154124/GNU-patch-Command-Injection-Directory-Traversal.html
- https://security.gentoo.org/glsa/201908-22
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SVWWGISFWACROJJPVJJL4UBLVZ7LPOLT/
- https://security.netapp.com/advisory/ntap-20190828-0001/
- https://github.com/irsl/gnu-patch-vulnerabilities
- 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
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.