CVE-2015-7545
Critical · 9.8CVSS
9.8
EPSS
18.7%
Published
Apr 13, 2016
CISA due date
—
Cloudanix analysis
A flaw in Git let attackers run their own code on a user's computer simply by getting the user to work with a project that had a specially crafted link inside its submodule settings.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Application
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The vulnerability allows remote attackers to execute arbitrary code because git-remote-ext and other remote helper programs fail to restrict permitted protocols when processing URLs referenced in .gitmodules files or submodule configurations.
Why it matters to the business
Organizations using affected Git versions face the risk of unauthorized code execution on developer or build systems during routine operations like cloning repositories with submodules, potentially leading to supply chain compromise, data theft, or deployment of persistent malware.
How an attack unfolds
An attacker creates or modifies a repository containing a .gitmodules file that references a submodule URL using a protocol handled by git-remote-ext, such as a command-injection capable scheme; when a victim clones or updates the repository with submodules enabled, the helper executes attacker-controlled commands without protocol validation.
How to fix it
Upgrade Git to version 2.3.10 or newer, 2.4.10 or newer, 2.5.4 or newer, or 2.6.1 or newer depending on the release line in use; disable submodule recursion where operationally feasible until patches are applied.
How to confirm the fix worked
Verify installed Git version meets or exceeds the fixed releases listed in the advisory; audit .gitmodules files across repositories for non-standard protocol schemes and test clone operations in an isolated environment.
Typical attack path
- Identify or publish a Git repository containing a malicious .gitmodules entry
- Embed a submodule URL that triggers an unrestricted remote helper protocol
- Wait for or lure a victim into performing git clone --recurse-submodules or submodule update
- Achieve arbitrary command execution on the victim's system via the helper
How to detect it
Review Git client logs and command history for invocations of git-remote-ext with unexpected URLs; inspect .gitmodules and .git/config files in cloned repositories for protocol schemes other than the standard git, http, https, or ssh.
What your security team should do
- Prioritize patching Git across all developer workstations, CI/CD pipelines, and build servers within the next 30 days
- Implement repository scanning to detect unsafe protocol references in .gitmodules before merges
- Restrict use of git submodule update --init --recursive on untrusted repositories until upgrades complete
The record
The (1) git-remote-ext and (2) unspecified other remote helper programs in Git before 2.3.10, 2.4.x before 2.4.10, 2.5.x before 2.5.4, and 2.6.x before 2.6.1 do not properly restrict the allowed protocols, which might allow remote attackers to execute arbitrary code via a URL in a (a) .gitmodules file or (b) unknown other sources in a submodule.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | git | 0 | 1:2.6.1-1 |
| Debian:12 | git | 0 | 1:2.6.1-1 |
| Debian:13 | git | 0 | 1:2.6.1-1 |
| Debian:7 | git | 0 | 1:1.7.10.4-1+wheezy2 |
| Debian:8 | git | 0 | 1:2.1.4-2.1+deb8u1 |
| Red Hat:enterprise_linux:7::client | emacs-git | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::client | emacs-git-el | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::client | git | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::client | git-all | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::client | git-bzr | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::client | git-cvs | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::client | git-daemon | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::client | git-debuginfo | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::client | git-email | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::client | git-gui | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::client | git-hg | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::client | git-p4 | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::client | git-svn | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::client | gitk | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::client | gitweb | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::client | perl-Git | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::client | perl-Git-SVN | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | emacs-git | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | emacs-git-el | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | git | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | git-all | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | git-bzr | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | git-cvs | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | git-daemon | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | git-debuginfo | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | git-email | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | git-gui | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | git-hg | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | git-p4 | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | git-svn | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | gitk | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | gitweb | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | perl-Git | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::computenode | perl-Git-SVN | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | emacs-git | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | emacs-git-el | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | git | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | git-all | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | git-bzr | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | git-cvs | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | git-daemon | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | git-debuginfo | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | git-email | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | git-gui | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | git-hg | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | git-p4 | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | git-svn | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | gitk | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | gitweb | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | perl-Git | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::server | perl-Git-SVN | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | emacs-git | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | emacs-git-el | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | git | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | git-all | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | git-bzr | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | git-cvs | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | git-daemon | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | git-debuginfo | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | git-email | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | git-gui | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | git-hg | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | git-p4 | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | git-svn | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | gitk | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | gitweb | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | perl-Git | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:enterprise_linux:7::workstation | perl-Git-SVN | 0 | 0:1.8.3.1-6.el7 |
| Red Hat:rhel_software_collections:2::el6 | git19-emacs-git | 0 | 0:1.9.4-3.el6.1 |
| Red Hat:rhel_software_collections:2::el6 | git19-emacs-git-el | 0 | 0:1.9.4-3.el6.1 |
| Red Hat:rhel_software_collections:2::el6 | git19-git | 0 | 0:1.9.4-3.el6.1 |
| Red Hat:rhel_software_collections:2::el6 | git19-git-all | 0 | 0:1.9.4-3.el6.1 |
| Red Hat:rhel_software_collections:2::el6 | git19-git-cvs | 0 | 0:1.9.4-3.el6.1 |
| Red Hat:rhel_software_collections:2::el6 | git19-git-daemon | 0 | 0:1.9.4-3.el6.1 |
| Red Hat:rhel_software_collections:2::el6 | git19-git-debuginfo | 0 | 0:1.9.4-3.el6.1 |
| Red Hat:rhel_software_collections:2::el6 | git19-git-email | 0 | 0:1.9.4-3.el6.1 |
| Red Hat:rhel_software_collections:2::el6 | git19-git-gui | 0 | 0:1.9.4-3.el6.1 |
| Red Hat:rhel_software_collections:2::el6 | git19-git-svn | 0 | 0:1.9.4-3.el6.1 |
| Red Hat:rhel_software_collections:2::el6 | git19-gitk | 0 | 0:1.9.4-3.el6.1 |
| Red Hat:rhel_software_collections:2::el6 | git19-gitweb | 0 | 0:1.9.4-3.el6.1 |
| Red Hat:rhel_software_collections:2::el6 | git19-perl-Git | 0 | 0:1.9.4-3.el6.1 |
| Red Hat:rhel_software_collections:2::el6 | git19-perl-Git-SVN | 0 | 0:1.9.4-3.el6.1 |
| Red Hat:rhel_software_collections:2::el7 | git19-emacs-git | 0 | 0:1.9.4-3.el7.1 |
| Red Hat:rhel_software_collections:2::el7 | git19-emacs-git-el | 0 | 0:1.9.4-3.el7.1 |
| Red Hat:rhel_software_collections:2::el7 | git19-git | 0 | 0:1.9.4-3.el7.1 |
| Red Hat:rhel_software_collections:2::el7 | git19-git-all | 0 | 0:1.9.4-3.el7.1 |
| Red Hat:rhel_software_collections:2::el7 | git19-git-bzr | 0 | 0:1.9.4-3.el7.1 |
| Red Hat:rhel_software_collections:2::el7 | git19-git-cvs | 0 | 0:1.9.4-3.el7.1 |
| Red Hat:rhel_software_collections:2::el7 | git19-git-daemon | 0 | 0:1.9.4-3.el7.1 |
| Red Hat:rhel_software_collections:2::el7 | git19-git-debuginfo | 0 | 0:1.9.4-3.el7.1 |
| Red Hat:rhel_software_collections:2::el7 | git19-git-email | 0 | 0:1.9.4-3.el7.1 |
| Red Hat:rhel_software_collections:2::el7 | git19-git-gui | 0 | 0:1.9.4-3.el7.1 |
| Red Hat:rhel_software_collections:2::el7 | git19-git-hg | 0 | 0:1.9.4-3.el7.1 |
| Red Hat:rhel_software_collections:2::el7 | git19-git-svn | 0 | 0:1.9.4-3.el7.1 |
| Red Hat:rhel_software_collections:2::el7 | git19-gitk | 0 | 0:1.9.4-3.el7.1 |
| Red Hat:rhel_software_collections:2::el7 | git19-gitweb | 0 | 0:1.9.4-3.el7.1 |
| Red Hat:rhel_software_collections:2::el7 | git19-perl-Git | 0 | 0:1.9.4-3.el7.1 |
| Red Hat:rhel_software_collections:2::el7 | git19-perl-Git-SVN | 0 | 0:1.9.4-3.el7.1 |
| SUSE:Linux Enterprise Server 12 | git | 0 | 1.8.5.6-15.1 |
| SUSE:Linux Enterprise Server 12 SP1 | git | 0 | 1.8.5.6-15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | git | 0 | 1.8.5.6-15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | git | 0 | 1.8.5.6-15.1 |
| SUSE:Linux Enterprise Software Development Kit 12 | git | 0 | 1.8.5.6-15.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP1 | git | 0 | 1.8.5.6-15.1 |
| Ubuntu:14.04:LTS | git | 0 | 1:1.9.1-1ubuntu0.2 |
| openSUSE:Tumbleweed | mercurial | 0 | 4.0-1.1 |
Related vulnerabilities
- CVE-2025-48384 Git is a fast, scalable, distributed revision control system with an unusually rich… Also affects git
- CVE-2024-52005 Git is a source code management tool. Also affects git
- CVE-2024-52006 Git is a fast, scalable, distributed revision control system with an unusually rich… Also affects git
- CVE-2024-50349 Git is a fast, scalable, distributed revision control system with an unusually rich… Also affects git
- CVE-2014-9390 Git before 1.8.5.6, 1.9.x before 1.9.5, 2.0.x before 2.0.5, 2.1.x before 2.1.4, and 2.2.x… Also affects git
- CVE-2017-15298 Git through 2.14.2 mishandles layers of tree objects, which allows remote attackers to… Also affects git
- CVE-2017-1000117 A malicious third-party can give a crafted "ssh://..." URL to an unsuspecting victim, and… Also affects git
- CVE-2017-14867 Git before 2.10.5, 2.11.x before 2.11.4, 2.12.x before 2.12.5, 2.13.x before 2.13.6, and… Also affects git