CVE Database›CVE-2019-1387

CVE-2019-1387

git: Remote code execution in recursive clones with nested submodules

Loading…

Severity

Important

Red Hat Product Security

7.5

CVSS 3.0

Review impact separately from score.

Published · December 10, 2019

Updated · June 28, 2026

Description

A flaw was discovered where git improperly validates submodules' names used to construct git metadata paths and does not prevent them from being nested in existing directories used to store another submodule's metadata. A remote attacker could abuse this flaw to trick a victim user into cloning a malicious repository containing submodules, which, when recursively cloned, would trigger the flaw and remotely execute code on the victim's machine.

Statement

This issue did not affect the versions of git as shipped with Red Hat Enterprise Linux 6 as they did not use submodules names to construct git metadata paths.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

Avoid running git clone --recurse-submodules and git submodule update with untrusted repositories.

CVSS / CWE

CVSS 3.0 · 7.5
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

CWE-20 · Improper Input Validation