Description
Git before 2.14.5, 2.15.x before 2.15.3, 2.16.x before 2.16.5, 2.17.x before 2.17.2, 2.18.x before 2.18.1, and 2.19.x before 2.19.1 allows remote code execution during processing of a recursive "git clone" of a superproject if a .gitmodules file has a URL field beginning with a '-' character.
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 | git | 1:2.19.1-1 | — |
| Debian 13 | git | 1:2.19.1-1 | — |
| Debian 12 | git | 1:2.19.1-1 | — |
| Debian 9 | git | 1:2.11.0-3+deb9u4 | DSA-4311-1 |
| Debian 8 | git | 1:2.1.4-2.1+deb8u7 | DLA-1533-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | git | 1:2.17.1-1ubuntu0.3 | USN-3791-1 |
| Ubuntu 16.04 LTS | git | 1:2.7.4-0ubuntu1.5 | USN-3791-1 |
| Ubuntu 14.04 LTS | git | 1:1.9.1-1ubuntu0.9 | USN-3791-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 7 | git +17 | 1.8.3.1-20.el7 | RHSA-2018:3408 |
| RHEL 6 | git +11 | 1.7.1-10.el6_10 | RHSA-2020:0316 |
| RHEL 3 | rh-git29-git +15 | 2.9.3-7.el6 | RHSA-2018:3541 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP1 | git | 2.26.1-3.25.2 | SUSE-SU-2020:1121-1 |
| SLES 15 | git | 2.16.4-3.6.1 | SUSE-SU-2018:3150-1 |
| SLES 15 | libgit2 | 0.26.8-3.8.1 | SUSE-SU-2018:4009-1 |
| SLES 12 SP4 | git | 2.12.3-27.17.2 | SUSE-SU-2018:4088-3 |
| SLES 12 SP3 | git | 2.12.3-27.17.2 | SUSE-SU-2018:4088-1 |
| SLES 12 SP2 | git | 2.12.3-27.17.2 | SUSE-SU-2018:4088-1 |
Show 10 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 SP1 | git | 2.12.3-27.17.2 | SUSE-SU-2018:4088-1 |
| SLES 12 | git | 2.12.3-27.17.2 | SUSE-SU-2018:4088-1 |
| SLES for SAP 12 SP4 | git | 2.12.3-27.17.2 | SUSE-SU-2018:4088-3 |
| SLES for SAP 12 SP3 | git | 2.12.3-27.17.2 | SUSE-SU-2018:4088-1 |
| SLES for SAP 12 SP2 | git | 2.12.3-27.17.2 | SUSE-SU-2018:4088-1 |
| SLES for SAP 12 SP1 | git | 2.12.3-27.17.2 | SUSE-SU-2018:4088-2 |
| SUSE OpenStack Cloud 8 | git | 2.12.3-27.17.2 | SUSE-SU-2018:4088-1 |
| SUSE OpenStack Cloud 7 | git | 2.12.3-27.17.2 | SUSE-SU-2018:4088-1 |
| SUSE HPE Helion OpenStack 8 | git | 2.12.3-27.17.2 | SUSE-SU-2018:4088-1 |
| SUSE Enterprise Storage 4 | git | 2.12.3-27.17.2 | SUSE-SU-2018:4088-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | git | 2.33.0-1.3 | openSUSE-SU-2024:10786-1 |
| openSUSE Tumbleweed | libgit2 | 1.1.1-1.2 | openSUSE-SU-2024:10943-1 |
| openSUSE Leap 15.1 | git | 2.26.1-lp151.4.9.1 | openSUSE-SU-2020:0598-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | git | 2.19.1-r0 | — |
| Alpine v3.23 | git | 2.19.1-r0 | — |
| Alpine v3.22 | git | 2.19.1-r0 | — |
| Alpine v3.21 | git | 2.19.1-r0 | — |
| Alpine v3.20 | git | 2.19.1-r0 | — |
Show 15 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | git | 2.19.1-r0 | — |
| Alpine v3.18 | git | 2.19.1-r0 | — |
| Alpine v3.17 | git | 2.19.1-r0 | — |
| Alpine v3.16 | git | 2.19.1-r0 | — |
| Alpine v3.15 | git | 2.19.1-r0 | — |
| Alpine v3.14 | git | 2.19.1-r0 | — |
| Alpine v3.13 | git | 2.19.1-r0 | — |
| Alpine v3.12 | git | 2.19.1-r0 | — |
| Alpine v3.11 | git | 2.19.1-r0 | — |
| Alpine v3.10 | git | 2.19.1-r0 | — |
| Alpine v3.9 | git | 2.19.1-r0 | — |
| Alpine v3.8 | git | 2.18.1-r0 | — |
| Alpine v3.7 | git | 2.15.3-r0 | — |
| Alpine v3.6 | git | 2.13.7-r1 | — |
| Alpine v3.5 | git | 2.11.3-r2 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2 | git +14 | 2.14.5-1.amzn2 | ALAS2-2018-1093 |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 7 | git +17 | 1.8.3.1-20.el7 | ELSA-2018-3408 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Malicious Git HTTP Server For CVE-2018-17456
exploit/multi/http/git_submodule_url_exec
Exploit-DB 2
- Git Submodule - Arbitrary Code Execution EDB-45631 · local · Oct 16, 2018
- Git Submodule - Arbitrary Code Execution (PoC) EDB-45548 · local · Oct 5, 2018
GitHub 5 repositories
-
AnonymKing/CVE-2018-17456 ★ 5 · Jun 21, 2019
CVE-2018-17456漏洞复现(PoC+Exp)
-
KKkai0315/CVE-2018-17456 ★ 0 · Jul 22, 2024
a test repository for CVE-2018-17456's PoC
-
799600966/CVE-2018-17456 ★ 0 · Jun 5, 2019
-
matlink/CVE-2018-17456 ★ 0 · Nov 8, 2018
-
shpik-kr/CVE-2018-17456 ★ 0 · Oct 21, 2018
1-day
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 17
- RHSA-2020:0316 Red Hat Security Advisory: git security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2018:3541 Red Hat Security Advisory: rh-git29-git security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2018:3408 Red Hat Security Advisory: git security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- DSA-4311-1 git - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-1533-1 git - security update Debian Security (DSA / DLA) · Mar 9, 2026
- USN-3791-1 git vulnerability Ubuntu Security Notices (USN) · Feb 10, 2026
- SUSE-SU-2018:3150-1 Security update for git SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2020:0598-1 Security update for git SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:4088-1 Security update for git SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:10786-1 git-2.33.0-1.3 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:4088-2 Security update for git SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:4009-1 Security update for libgit2 SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:10943-1 libgit2-1_1-1.1.1-1.2 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2020:1121-1 Security update for git SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:4088-3 Security update for git SUSE / openSUSE Security Updates · May 2, 2025
- ELSA-2018-3408 Important: git security update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · Nov 9, 2018
- ALAS2-2018-1093 Important: git security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Oct 25, 2018
References
- 45631 exploit
- 105523 vdb-entry
- 1041811 vdb-entry
- DSA-4311 vendor-advisory
- RHSA-2018:3505 vendor-advisory
- https://github.com/git/git/commit/1a7fd1fb2998002da6e9ff2ee46e1bdd25ee8404
- 45548 exploit
- RHSA-2018:3541 vendor-advisory
- https://github.com/git/git/commit/a124133e1e6ab5c7a9fef6d0e6bcb084e3455b46
- RHSA-2018:3408 vendor-advisory
- https://marc.info/?l=git&m=153875888916397&w=2
- https://www.openwall.com/lists/oss-security/2018/10/06/3
- USN-3791-1 vendor-advisory
- 20190320 March 2019 Sourcetree Advisory - Multiple Remote Code Execution Vulnerabilities mailing-list
- 107511 vdb-entry
- http://packetstormsecurity.com/files/152173/Sourcetree-Git-Arbitrary-Code-Execution-URL-Handling.html
- RHSA-2020:0316 vendor-advisory
- openSUSE-SU-2020:0598 vendor-advisory