Public vulnerability disclosure

CVE-2023-29007

Arbitrary configuration injection via `git submodule deinit`

publishedCWE-74

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`.

Technical severity7.0 highCVSS 3.1 · CNA: GitHub_M
Published2023-04-25Source updated 2026-11-02
Collected2026-11-033 attributed sources

Fixes and workarounds

Fix

The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches.

Source: [email protected]

Fix

The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches.

Source: af854a3a-2127-422b-91ae-364da2661108

Affected products and versions

Affected products, source version ranges and reporting authorities
ProductVersionsAuthority
git
git
< 2.30.9 (affected)
>= 2.31.0, < 2.31.8 (affected)
>= 2.32.0, < 2.32.7 (affected)
>= 2.33.0, < 2.33.8 (affected)
>= 2.34.0, < 2.34.8 (affected)
>= 2.35.0, < 2.35.8 (affected)
>= 2.36.0, < 2.36.6 (affected)
>= 2.37.0, < 2.37.7 (affected)
>= 2.38.0, < 2.38.5 (affected)
>= 2.39.0, < 2.39.3 (affected)
>= 2.40.0, < 2.40.1 (affected)
CNA: GitHub_M

Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.

NVD applicability configurations (2)

These expressions retain AND/OR operators, negation, and required environmental products. A listed product is not sufficient to establish exposure when additional conditions apply.

[
  {
    "negate": false,
    "nodes": [
      {
        "cpeMatch": [
          {
            "criteria": "cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*",
            "versionEndExcluding": "2.30.9",
            "vulnerable": true
          },
          {
            "criteria": "cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*",
            "versionEndExcluding": "2.31.8",
            "versionStartIncluding": "2.31.0",
            "vulnerable": true
          },
          {
            "criteria": "cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*",
            "versionEndExcluding": "2.32.7",
            "versionStartIncluding": "2.32.0",
            "vulnerable": true
          },
          {
            "criteria": "cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*",
            "versionEndExcluding": "2.33.8",
            "versionStartIncluding": "2.33.0",
            "vulnerable": true
          },
          {
            "criteria": "cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*",
            "versionEndExcluding": "2.34.8",
            "versionStartIncluding": "2.34.0",
            "vulnerable": true
          },
          {
            "criteria": "cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*",
            "versionEndExcluding": "2.35.8",
            "versionStartIncluding": "2.35.0",
            "vulnerable": true
          },
          {
            "criteria": "cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*",
            "versionEndExcluding": "2.36.5",
            "versionStartIncluding": "2.36.0",
            "vulnerable": true
          },
          {
            "criteria": "cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*",
            "versionEndExcluding": "2.37.7",
            "versionStartIncluding": "2.37.0",
            "vulnerable": true
          },
          {
            "criteria": "cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*",
            "versionEndExcluding": "2.38.5",
            "versionStartIncluding": "2.38.0",
            "vulnerable": true
          },
          {
            "criteria": "cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*",
            "versionEndExcluding": "2.39.3",
            "versionStartIncluding": "2.39.0",
            "vulnerable": true
          },
          {
            "criteria": "cpe:2.3:a:git-scm:git:2.40.0:*:*:*:*:*:*:*",
            "vulnerable": true
          }
        ],
        "negate": false,
        "operator": "OR"
      }
    ],
    "operator": "OR"
  },
  {
    "negate": false,
    "nodes": [
      {
        "cpeMatch": [
          {
            "criteria": "cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*",
            "vulnerable": true
          },
          {
            "criteria": "cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*",
            "vulnerable": true
          },
          {
            "criteria": "cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*",
            "vulnerable": true
          }
        ],
        "negate": false,
        "operator": "OR"
      }
    ],
    "operator": "OR"
  }
]

CVSS assessments

CVSS scores, vectors and reporting authorities
Version / scoreVectorAuthority
3.1 / 7.0
high
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:HCNA: GitHub_M
3.1 / 7.8
high
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HNVD: [email protected]
3.1 / 7.0
high
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:HNVD: [email protected]

Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

References

For agents and automation

Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.

Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.

Endpoints and access details

https://api.y2.dev/api/v2/cyber/cves
https://api.y2.dev/api/v2/cyber/cves/{cveId}

A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.

For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.

Agent access JSON · OpenAPI · CVE API guide