Critical Remote Code Execution Vulnerability in Git Package

git Updated 02 Oct 2025

Summary

06/10/2018
N/A
Yes i
Critical
9.8

ALPINE-CVE-2018-17456: 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 superproj... Affects git versions < 2.19.1-r0. Fixed in 2.19.1-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Git is a distributed version control system widely used for source code management in software development. It allows multiple developers to work on a project simultaneously, tracking changes and facilitating collaboration. The Git package is essential for managing repositories and handling versioning. However, it has been found to be vulnerable to a specific issue that can lead to remote code execution during the cloning of repositories, particularly when handling malicious .gitmodules files.

Vulnerability Detail

The vulnerability, identified as CVE-2018-17456, affects Git versions prior to 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. It allows an attacker to execute arbitrary code on a victim's machine when they perform a recursive 'git clone' of a superproject that contains a .gitmodules file with a URL field starting with a '-' character. This can lead to severe security implications, including unauthorized access and control over the affected system.

How To Fix

Minimum fixed version

2.19.1-r0

This is the first release that contains the fix.

sudo apk add --upgrade git

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using 'git clone' on repositories that you do not trust, especially those with a .gitmodules file that may contain malicious URLs. Always review the contents of .gitmodules files before executing clone commands.

Conclusion

The CVE-2018-17456 vulnerability in Git poses a significant risk of remote code execution through malicious .gitmodules files. Users are advised to update their Git installations to the latest patched versions to mitigate this risk. Additionally, employing best practices when cloning repositories can further enhance security.

See every vulnerability recorded for git →

Share this vulnerability

FAQ

CVE-2018-17456 is a critical vulnerability in Git that allows remote code execution when processing a malicious .gitmodules file during a recursive clone.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Affected versions include Git versions 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.

The CVSS score of this vulnerability is 9.8, indicating a critical level of severity.

Regularly update your Git installation to the latest version and review any third-party repositories before cloning them.

Related vulnerabilities

Recent vulnerabilities recorded for git.

How To Fix

Minimum fixed version

2.19.1-r0

This is the first release that contains the fix.

sudo apk add --upgrade git

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback