Cloudanix VulnDB

CVE-2017-14867

High · 8.8

CVSS

8.8

EPSS

36.0%

Published

Sep 29, 2017

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

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

  1. Identify a reachable Git server exposing git-shell or cvsserver
  2. Craft a module name containing shell metacharacters that invoke desired OS commands
  3. Submit the payload via SSH or the Git protocol to the vulnerable subcommand handler
  4. 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