Arbitrary configuration injection via `git submodule deinit`
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 15 fixed, 1 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat.
Summary
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`.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Git | git | before 2.30.9; 2.31.0 to before 2.31.8; 2.32.0 to before 2.32.7; 2.33.0 to before 2.33.8; 2.34.0 to before 2.34.8; 2.35.0 to before 2.35.8; 2.36.0 to before 2.36.6; 2.37.0 to before 2.37.7; 2.38.0 to before 2.38.5; 2.39.0 to before 2.39.3; 2.40.0 to before 2.40.1 | 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, 2.40.1 | Patch available | CNA |
- git VendorGit Affected before 2.30.9; 2.31.0 to before 2.31.8; 2.32.0 to before 2.32.7; 2.33.0 to before 2.33.8; 2.34.0 to before 2.34.8; 2.35.0 to before 2.35.8; 2.36.0 to before 2.36.6; 2.37.0 to before 2.37.7; 2.38.0 to before 2.38.5; 2.39.0 to before 2.39.3; 2.40.0 to before 2.40.1 Fixed in 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, 2.40.1 Patch available CNA
CPE configurations NVD · 5
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* | before 2.30.9; 2.31.0 to before 2.31.8; 2.32.0 to before 2.32.7; 2.33.0 to before 2.33.8; 2.34.0 to before 2.34.8; 2.35.0 to before 2.35.8; 2.36.0 to before 2.36.5; 2.37.0 to before 2.37.7; 2.38.0 to before 2.38.5; 2.39.0 to before 2.39.3 | Vulnerable | Git-scm |
| cpe:2.3:a:git-scm:git:2.40.0:*:*:*:*:*:*:* | 2.40.0 | Vulnerable | Git-scm |
| cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* | 36 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:* | 37 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:* | 38 | Vulnerable | Fedoraproject |
- cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* Versions before 2.30.9; 2.31.0 to before 2.31.8; 2.32.0 to before 2.32.7; 2.33.0 to before 2.33.8; 2.34.0 to before 2.34.8; 2.35.0 to before 2.35.8; 2.36.0 to before 2.36.5; 2.37.0 to before 2.37.7; 2.38.0 to before 2.38.5; 2.39.0 to before 2.39.3 Vulnerable ·Git-scm
- cpe:2.3:a:git-scm:git:2.40.0:*:*:*:*:*:*:* Versions 2.40.0 Vulnerable ·Git-scm
- cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* Versions 36 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:* Versions 37 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:* Versions 38 Vulnerable ·Fedoraproject
Remediation
- Fix · CNA git (git) Fixed in 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, 2.40.1
Red Hat 9 advisories
- RHSA-2023:3382 Released 2023-05-31 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream AUS (v. 8.2) git-2.18.4-4.el8_2, git-all-2.18.4-4.el8_2, git-core-2.18.4-4.el8_2 +11
- RHSA-2023:3280 Released 2023-05-23 · Red Hat rating Importantrh-git227-git security update
- Red Hat Software Collections for RHEL Workstation(v. 7) rh-git227-git-2.27.0-6.el7, rh-git227-git-all-2.27.0-6.el7, rh-git227-git-core-2.27.0-6.el7 +14
- Red Hat Software Collections for RHEL(v. 7) rh-git227-git-2.27.0-6.el7, rh-git227-git-all-2.27.0-6.el7, rh-git227-git-core-2.27.0-6.el7 +14
- RHSA-2023:3263 Released 2023-05-23 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux Client Optional (v. 7) emacs-git-1.8.3.1-25.el7_9, emacs-git-el-1.8.3.1-25.el7_9, git-1.8.3.1-25.el7_9 +15
- Red Hat Enterprise Linux ComputeNode Optional (v. 7) emacs-git-1.8.3.1-25.el7_9, emacs-git-el-1.8.3.1-25.el7_9, git-1.8.3.1-25.el7_9 +15
- Red Hat Enterprise Linux Server (v. 7) git-1.8.3.1-25.el7_9, perl-Git-1.8.3.1-25.el7_9
- Red Hat Enterprise Linux Server Optional (v. 7) emacs-git-1.8.3.1-25.el7_9, emacs-git-el-1.8.3.1-25.el7_9, git-all-1.8.3.1-25.el7_9 +13
- Red Hat Enterprise Linux Workstation (v. 7) git-1.8.3.1-25.el7_9, perl-Git-1.8.3.1-25.el7_9
- Red Hat Enterprise Linux Workstation Optional (v. 7) emacs-git-1.8.3.1-25.el7_9, emacs-git-el-1.8.3.1-25.el7_9, git-all-1.8.3.1-25.el7_9 +13
Show 6 more Red Hat advisories
- RHSA-2023:3247 Released 2023-05-22 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream EUS (v.8.6) git-2.31.1-4.el8_6, git-all-2.31.1-4.el8_6, git-core-2.31.1-4.el8_6 +12
- RHSA-2023:3246 Released 2023-05-22 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream (v. 8) git-2.39.3-1.el8_8, git-all-2.39.3-1.el8_8, git-core-2.39.3-1.el8_8 +12
- RHSA-2023:3245 Released 2023-05-22 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream (v. 9) git-2.39.3-1.el9_2, git-all-2.39.3-1.el9_2, git-core-2.39.3-1.el9_2 +12
- RHSA-2023:3248 Released 2023-05-22 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream EUS (v.9.0) git-2.31.1-5.el9_0, git-all-2.31.1-5.el9_0, git-core-2.31.1-5.el9_0 +12
- RHSA-2023:3243 Released 2023-05-22 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream EUS (v.8.4) git-2.27.0-4.el8_4, git-all-2.27.0-4.el8_4, git-core-2.27.0-4.el8_4 +12
- RHSA-2023:3192 Released 2023-05-17 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream E4S (v. 8.1) git-2.18.4-3.el8_1, git-all-2.18.4-3.el8_1, git-core-2.18.4-3.el8_1 +11
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2023:3246 |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2023:3245 |
| Red Hat Enterprise Linux AppStream AUS (v. 8.2) | Fixed | RHSA-2023:3382 |
| Red Hat Enterprise Linux AppStream E4S (v. 8.1) | Fixed | RHSA-2023:3192 |
| Red Hat Enterprise Linux AppStream EUS (v.8.4) | Fixed | RHSA-2023:3243 |
| Red Hat Enterprise Linux AppStream EUS (v.8.6) | Fixed | RHSA-2023:3247 |
| Red Hat Enterprise Linux AppStream EUS (v.9.0) | Fixed | RHSA-2023:3248 |
| Red Hat Enterprise Linux Client Optional (v. 7) | Fixed | RHSA-2023:3263 |
| Red Hat Enterprise Linux ComputeNode Optional (v. 7) | Fixed | RHSA-2023:3263 |
| Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2023:3263 |
| Red Hat Enterprise Linux Server Optional (v. 7) | Fixed | RHSA-2023:3263 |
| Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2023:3263 |
| Red Hat Enterprise Linux Workstation Optional (v. 7) | Fixed | RHSA-2023:3263 |
| Red Hat Software Collections for RHEL Workstation(v. 7) | Fixed | RHSA-2023:3280 |
| Red Hat Software Collections for RHEL(v. 7) | Fixed | RHSA-2023:3280 |
Timeline
- 2026-10-02 Threatist record created from CVE-2023-29007
- 2026-11-02 CISA SSVC decision points changed
References
Advisory 6
- https://github.com/git/git/security/advisories/GHSA-v48j-4xgg-4844
- https://github.com/git/git/blob/9ce9dea4e1c2419cca126d29fa7730baa078a11b/Documentation/RelNotes/2.30.9.txt
- https://lists.fedoraproject.org/archives/list/[email protected]/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/
- https://security.gentoo.org/glsa/202312-15
More Git vulnerabilities
- TI-2025-30709 Git allows arbitrary code execution through broken config quoting KEVCVSS 3.1HIGH 8.1
- TI-2022-07580 gitattributes parsing integer overflow in git CVSS 3.1CRITICAL 9.8
- TI-2022-20244 Integer overflow in `git archive`, `git log --format` leading to RCE in git CVSS 3.1CRITICAL 9.8
- TI-2021-04400 malicious repositories can execute remote code while cloning CVSS 3.1HIGH 8.0
- TI-2024-21101 Git's recursive clones on case-insensitive filesystems that support symlinks are susceptible to Remote Code Execution CVSS 3.1CRITICAL 9.1
- TI-2023-10933 "git apply --reject" partially-controlled arbitrary file write CVSS 3.1HIGH 7.5
Sources
- CVE-2023-29007 · CVE Program
- CVE-2023-29007 · NVD
- FIRST EPSS
- CVE-2023-29007 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences