Description
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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | patch | 2.7.6-5 | — |
| Debian 13 | patch | 2.7.6-5 | — |
| Debian 12 | patch | 2.7.6-5 | — |
| Debian 10 | patch | 2.7.6-3+deb10u1 | DSA-4489-1 |
| Debian 9 | patch | 2.7.5-1+deb9u2 | DSA-4489-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 8 | patch | 2.7.5-1+deb8u3 | DLA-1864-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | patch | 2.7.6-2ubuntu1.1 | — |
| Ubuntu 16.04 LTS | patch | 2.7.5-1ubuntu0.16.04.2 | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 14.04 LTS | patch | 2.7.1-4ubuntu2.4+esm1 | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 8 | patch | 2.7.6-9.el8_0 | RHSA-2019:2798 |
| RHEL 7 | patch | 2.7.1-12.el7_7 | RHSA-2019:2964 |
Show 5 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 7.6 EUS | patch | 2.7.1-11.el7_6 | RHSA-2019:3758 |
| RHEL 7.5 EUS | patch | 2.7.1-11.el7_5 | RHSA-2019:3757 |
| RHEL 7.4 TUS | patch | 2.7.1-11.el7_4 | RHSA-2019:4061 |
| RHEL 7.4 E4S | patch | 2.7.1-11.el7_4 | RHSA-2019:4061 |
| RHEL 7.4 AUS | patch | 2.7.1-11.el7_4 | RHSA-2019:4061 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | patch | 2.7.6-r6 | — |
| Alpine v3.23 | patch | 2.7.6-r6 | — |
| Alpine v3.22 | patch | 2.7.6-r6 | — |
| Alpine v3.21 | patch | 2.7.6-r6 | — |
| Alpine v3.20 | patch | 2.7.6-r6 | — |
Show 11 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | patch | 2.7.6-r6 | — |
| Alpine v3.18 | patch | 2.7.6-r6 | — |
| Alpine v3.17 | patch | 2.7.6-r6 | — |
| Alpine v3.16 | patch | 2.7.6-r6 | — |
| Alpine v3.15 | patch | 2.7.6-r6 | — |
| Alpine v3.14 | patch | 2.7.6-r6 | — |
| Alpine v3.13 | patch | 2.7.6-r6 | — |
| Alpine v3.12 | patch | 2.7.6-r6 | — |
| Alpine v3.11 | patch | 2.7.6-r6 | — |
| Alpine v3.10 | patch | 2.7.6-r6 | — |
| Alpine v3.9 | patch | 2.7.6-r6 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2 | patch | 2.7.1-12.amzn2 | ALAS2-2019-1317 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | patch | 2.7.6-9 | — |
| Azure Linux 2 (CBL-Mariner) | patch | 2.7.6-7 | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 8 | patch | 2.7.6-9.el8_0 | ELSA-2019-2798 |
| Oracle Linux 7 | patch | 2.7.1-12.el7_7 | ELSA-2019-2964 |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | patch | 2.7.6-r3 | — |
Advisories 11
- RHSA-2019:3757 Red Hat Security Advisory: patch security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2019:3758 Red Hat Security Advisory: patch security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2019:2964 Red Hat Security Advisory: patch security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- DSA-4489-1 patch - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-1864-1 patch - security update Debian Security (DSA / DLA) · Mar 9, 2026
- RHSA-2019:4061 Red Hat Security Advisory: patch security update Red Hat Security Advisories (RHSA) · Nov 22, 2025
- RHSA-2019:2798 Red Hat Security Advisory: patch security update Red Hat Security Advisories (RHSA) · Nov 22, 2025
- VDE-2025-053 Phoenix Contact: Multiple Vulnerabilities in PLCnext Firmware CERT@VDE · Jul 8, 2025
- ALAS2-2019-1317 Important: patch security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Nov 7, 2019
- ELSA-2019-2964 Important: patch security update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · Oct 3, 2019
- ELSA-2019-2798 Important: patch security update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · Sep 19, 2019
References
- https://git.savannah.gnu.org/cgit/patch.git/commit/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0
- 20190816 Details about recent GNU patch vulnerabilities mailing-list
- http://packetstormsecurity.com/files/154124/GNU-patch-Command-Injection-Directory-Traversal.html
- https://github.com/irsl/gnu-patch-vulnerabilities
- RHSA-2019:2798 vendor-advisory
- RHSA-2019:2964 vendor-advisory
- RHSA-2019:3757 vendor-advisory
- RHSA-2019:3758 vendor-advisory
- RHSA-2019:4061 vendor-advisory