CVE-2023-29007

Arbitrary configuration injection via `git submodule deinit`

HIGH
7.8
CVSS Score
Published: April 25, 2023 at 08:09 PM UTC
Updated: June 17, 2026 at 05:49 AM UTC
3 products affected across 3 vendorsFedoraGitGit

Using git by git?

Get instant alerts when new vulnerabilities affect git - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 6%

Description

Git is a revision control system. Prior to versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1, a specially crafted `.gitmodules` file with submodule URLs that are longer than 1024 characters can used to exploit a bug in `config.c::git_config_copy_or_rename_section_in_file()`. This bug can be used to inject arbitrary configuration into a user's `$GIT_DIR/config` when attempting to remove the configuration section associated with that submodule. When the attacker injects configuration values which specify executables to run (such as `core.pager`, `core.editor`, `core.sshCommand`, etc.) this can lead to a remote code execution. A fix A fix is available in versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1. As a workaround, avoid running `git submodule deinit` on untrusted repositories or without prior inspection of any submodule sections in `$GIT_DIR/config`.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 2.30.92.31.0 ≤ v < 2.31.82.32.0 ≤ v < 2.32.72.33.0 ≤ v < 2.33.82.34.0 ≤ v < 2.34.82.35.0 ≤ v < 2.35.82.36.0 ≤ v < 2.36.52.37.0 ≤ v < 2.37.72.38.0 ≤ v < 2.38.52.39.0 ≤ v < 2.39.32.40.0
Affected range stops below 2.30.9, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.31.8, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.32.7, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.33.8, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.34.8, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.35.8, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.36.5, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.37.7, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.38.5, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.39.3, so it looks safe — our inference, not a vendor statement
Git· Gitrubygems
60%
v < 2.30.9v < 2.31.8v < 2.32.7v < 2.33.8v < 2.34.8v < 2.35.8v < 2.36.6v < 2.37.7v < 2.38.5v < 2.39.3v < 2.40.1
Affected range stops below 2.30.9, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.31.8, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.32.7, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.33.8, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.34.8, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.35.8, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.36.6, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.37.7, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.38.5, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.39.3, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.40.1, so it looks safe — our inference, not a vendor statement

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-74

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card