CVE-2017-14867
High · 8.8CVSS
8.8
EPSS
36.0%
Published
Sep 29, 2017
CISA due date
—
Cloudanix analysis
Older versions of the popular source-code tool Git let attackers run any commands they want on the computer if they can reach it with a specially crafted request.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Application
- Class
- Command Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Unsafe Perl scripts in Git subcommands such as cvsserver accept module names containing shell metacharacters, enabling arbitrary OS command execution; the vulnerable code path remains reachable via git-shell even when CVS support is disabled.
Why it matters to the business
Attackers who can reach a vulnerable Git installation can run any commands on the host, leading to full system compromise, data theft, or ransomware deployment; the flaw affects widely used Git packages across Linux distributions and has been public for years.
How an attack unfolds
An attacker supplies a crafted module name containing shell metacharacters to a Git subcommand such as cvsserver over an SSH session handled by git-shell; the unsafe Perl script passes the input directly to the shell, resulting in immediate command execution on the server.
How to fix it
Upgrade Git to version 2.10.5 or later, 2.11.4 or later, 2.12.5 or later, 2.13.6 or later, or 2.14.2 or later; apply the corresponding security updates from your Linux distribution package manager.
How to confirm the fix worked
Run 'git --version' on affected systems and confirm the installed version meets or exceeds one of the fixed releases listed in remediation; attempt a controlled non-destructive test payload in an isolated environment to verify the injection vector is closed.
Typical attack path
- Identify a reachable Git server exposing git-shell or cvsserver
- Craft a module name containing shell metacharacters that invoke desired OS commands
- Submit the payload via SSH or the Git protocol to the vulnerable subcommand handler
- Execute arbitrary commands, establish persistence, or exfiltrate data
How to detect it
Search SSH daemon logs and Git server logs for unusual module names containing shell metacharacters such as semicolons, pipes, or backticks sent to cvsserver or similar subcommands; review process execution logs for unexpected child processes spawned by git or perl during repository operations.
What your security team should do
- Immediately upgrade all Git installations to a fixed release
- Restrict git-shell access to only trusted users and repositories
- Monitor package repositories for backported fixes on older distribution releases
- Audit any custom scripts or wrappers that invoke Git subcommands
The record
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 2.14.x before 2.14.2 uses unsafe Perl scripts to support subcommands such as cvsserver, which allows attackers to execute arbitrary OS commands via shell metacharacters in a module name. The vulnerable code is reachable via git-shell even without CVS support.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | git | 0 | 1:2.14.2-1 |
| Debian:12 | git | 0 | 1:2.14.2-1 |
| Debian:13 | git | 0 | 1:2.14.2-1 |
| Debian:14 | git | 0 | 1:2.14.2-1 |
| Debian:7 | git | 0 | 1:1.7.10.4-1+wheezy6 |
| Debian:8 | git | 0 | 1:2.1.4-2.1+deb8u5 |
| Debian:9 | git | 0 | 1:2.11.0-3+deb9u2 |
| Mageia:6 | git | 0 | 2.13.6-1.mga6 |
| SUSE:Linux Enterprise Server 12 SP1-LTSS | git | 0 | 2.12.3-27.9.1 |
| SUSE:Linux Enterprise Server 12 SP2 | git | 0 | 2.12.3-27.9.1 |
| SUSE:Linux Enterprise Server 12 SP3 | git | 0 | 2.12.3-27.9.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | git | 0 | 2.12.3-27.9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | git | 0 | 2.12.3-27.9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | git | 0 | 2.12.3-27.9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | git | 0 | 2.12.3-27.9.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | git | 0 | 1.7.12.4-0.18.6.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | git | 0 | 2.12.3-27.9.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP3 | git | 0 | 2.12.3-27.9.1 |
| SUSE:OpenStack Cloud 6 | git | 0 | 2.12.3-27.9.1 |
| SUSE:Studio Onsite 1.3 | git | 0 | 1.7.12.4-0.18.6.1 |
| Ubuntu:14.04:LTS | git | 0 | 1:1.9.1-1ubuntu0.7 |
| Ubuntu:16.04:LTS | git | 0 | 1:2.7.4-0ubuntu1.3 |
| openSUSE:Tumbleweed | git | 0 | 2.33.0-1.3 |
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-8386 git-shell in git before 2.4.12, 2.5.x before 2.5.6, 2.6.x before 2.6.7, 2.7.x before… Also affects git