Description
contrib/completion/git-prompt.sh in Git before 1.9.3 does not sanitize branch names in the PS1 variable, allowing a malicious repository to cause code execution.
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.0.0~rc2-1 | — |
| Debian 13 | git | 1:2.0.0~rc2-1 | — |
| Debian 12 | git | 1:2.0.0~rc2-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 14.04 LTS | git | 1:1.9.1-1ubuntu0.4 | USN-3243-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 7 | git +15 | 1.8.3.1-11.el7 | RHSA-2017:2004 |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 7 | git +15 | 1.8.3.1-11.el7 | ELSA-2017-2004 |
Advisories 3
- RHSA-2017:2004 Red Hat Security Advisory: git security and bug fix update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- USN-3243-1 git vulnerability Ubuntu Security Notices (USN) · Feb 10, 2026
- ELSA-2017-2004 Moderate: git security and bug fix update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · Aug 7, 2017