Arbitrary Command Execution Vulnerability in Git Package

git Updated 02 Oct 2025

Summary

11/12/2019
N/A
Yes i
High
7.8

ALPINE-CVE-2019-19604: Arbitrary command execution is possible in Git before 2.20.2, 2.21.x before 2.21.1, 2.22.x before 2.22.2, 2.23.x before 2.23.1, and 2.24.x before 2.24.1 because a "git submodule update" operation can run commands found i... Affects git versions < 2.22.2-r0. Fixed in 2.22.2-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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Git is a widely used version control system that allows developers to track changes in their code and collaborate on projects. It is known for its speed, efficiency, and support for non-linear development workflows. However, certain versions of Git are vulnerable to an arbitrary command execution issue, which can be exploited through malicious repositories.

Vulnerability Detail

The vulnerability arises from the way Git handles the '.gitmodules' file during a 'git submodule update' operation. If a repository contains malicious entries in this file, it can lead to the execution of arbitrary commands on the user's system. This issue affects Git versions prior to 2.20.2, 2.21.x before 2.21.1, 2.22.x before 2.22.2, 2.23.x before 2.23.1, and 2.24.x before 2.24.1. The potential ramifications include unauthorized access to system resources and data, making it a significant security concern.

How To Fix

Minimum fixed version

2.22.2-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 submodule update' on repositories from untrusted sources. Always review the contents of the '.gitmodules' file before executing any commands that may trigger submodule updates.

Conclusion

The arbitrary command execution vulnerability in Git poses a significant risk to users, especially when interacting with untrusted repositories. It is crucial to update to the latest patched versions of Git to mitigate this risk and ensure the security of your development environment.

See every vulnerability recorded for git →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.8, indicating a high severity level.

Git versions before 2.20.2, 2.21.x before 2.21.1, 2.22.x before 2.22.2, 2.23.x before 2.23.1, and 2.24.x before 2.24.1 are affected.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software using just a manifest file. Visit Vulert Scanner to check if your application is affected.

If you cannot update Git immediately, avoid executing commands from untrusted repositories and review the '.gitmodules' file carefully.

Yes, using tools like Vulert allows you to automate the monitoring of open-source vulnerabilities without requiring access to the code or installation.

Related vulnerabilities

Recent vulnerabilities recorded for git.

How To Fix

Minimum fixed version

2.22.2-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