# CVE-2023-29007: Arbitrary configuration injection via `git submodule deinit`

Status: published. Published: 2023-04-25. Updated: 2026-11-02.

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

## Remediation

- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: security-advisories@github.com) — https://github.com/git/git/commit/528290f8c61222433a8cf02fb7cfffa8438432b4
- 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) — https://github.com/git/git/commit/528290f8c61222433a8cf02fb7cfffa8438432b4

## Affected products and versions

- 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). Source: CNA: GitHub_M

## NVD configuration conditions

Affected CPE matches depend on the following AND/OR and negation conditions:

```json
[
  {
    "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"
  }
]
```

## Severity and prioritization

- CVSS 3.1: 7 (high); CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H; source: CNA: GitHub_M

- CVSS 3.1: 7.8 (high); CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H; source: NVD: nvd@nist.gov

- CVSS 3.1: 7 (high); CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H; source: NVD: security-advisories@github.com

- CISA KEV: No listing in collected sources

- EPSS: 5.61% as of 2026-11-02; percentile 92.92%

- SSVC: exploitation none; automatable no; technical impact total; source ADP: CISA-ADP

- Weaknesses: CWE-74

## Exploit evidence

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

## References

- https://github.com/git/git/security/advisories/GHSA-v48j-4xgg-4844 (CNA: GitHub_M; x_refsource_CONFIRM)

- https://github.com/git/git/commit/528290f8c61222433a8cf02fb7cfffa8438432b4 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/git/git/blob/9ce9dea4e1c2419cca126d29fa7730baa078a11b/Documentation/RelNotes/2.30.9.txt (CNA: GitHub_M; x_refsource_MISC)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/ (CNA: GitHub_M)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/ (CNA: GitHub_M)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/ (CNA: GitHub_M)

- https://security.gentoo.org/glsa/202312-15 (CNA: GitHub_M)

- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html (CNA: GitHub_M)

- https://github.com/git/git/security/advisories/GHSA-v48j-4xgg-4844 (ADP: CVE; x_refsource_CONFIRM, x_transferred)

- https://github.com/git/git/commit/528290f8c61222433a8cf02fb7cfffa8438432b4 (ADP: CVE; x_refsource_MISC, x_transferred)

- https://github.com/git/git/blob/9ce9dea4e1c2419cca126d29fa7730baa078a11b/Documentation/RelNotes/2.30.9.txt (ADP: CVE; x_refsource_MISC, x_transferred)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/ (ADP: CVE; x_transferred)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/ (ADP: CVE; x_transferred)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/ (ADP: CVE; x_transferred)

- https://security.gentoo.org/glsa/202312-15 (ADP: CVE; x_transferred)

- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html (ADP: CVE; x_transferred)

- https://lists.debian.org/debian-lts-announce/2024/09/msg00009.html (ADP: CVE)

- https://github.com/git/git/blob/9ce9dea4e1c2419cca126d29fa7730baa078a11b/Documentation/RelNotes/2.30.9.txt (security-advisories@github.com; Vendor Advisory)

- https://github.com/git/git/commit/528290f8c61222433a8cf02fb7cfffa8438432b4 (security-advisories@github.com; Patch)

- https://github.com/git/git/security/advisories/GHSA-v48j-4xgg-4844 (security-advisories@github.com; Vendor Advisory)

- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html (security-advisories@github.com)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/ (security-advisories@github.com; Mailing List, Third Party Advisory)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/ (security-advisories@github.com; Mailing List, Third Party Advisory)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/ (security-advisories@github.com; Mailing List, Third Party Advisory)

- https://security.gentoo.org/glsa/202312-15 (security-advisories@github.com; Third Party Advisory)

- https://github.com/git/git/blob/9ce9dea4e1c2419cca126d29fa7730baa078a11b/Documentation/RelNotes/2.30.9.txt (af854a3a-2127-422b-91ae-364da2661108; Vendor Advisory)

- https://github.com/git/git/commit/528290f8c61222433a8cf02fb7cfffa8438432b4 (af854a3a-2127-422b-91ae-364da2661108; Patch)

- https://github.com/git/git/security/advisories/GHSA-v48j-4xgg-4844 (af854a3a-2127-422b-91ae-364da2661108; Vendor Advisory)

- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html (af854a3a-2127-422b-91ae-364da2661108)

- https://lists.debian.org/debian-lts-announce/2024/09/msg00009.html (af854a3a-2127-422b-91ae-364da2661108)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/ (af854a3a-2127-422b-91ae-364da2661108; Mailing List, Third Party Advisory)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/ (af854a3a-2127-422b-91ae-364da2661108; Mailing List, Third Party Advisory)

- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/ (af854a3a-2127-422b-91ae-364da2661108; Mailing List, Third Party Advisory)

- https://security.gentoo.org/glsa/202312-15 (af854a3a-2127-422b-91ae-364da2661108; Third Party Advisory)

## Provenance

- CNA: GitHub_M: https://www.cve.org/CVERecord?id=CVE-2023-29007; retrieved 2026-11-02; source updated 2026-11-02

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-29007; retrieved 2026-11-03; source updated 2026-11-02

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2023-29007; retrieved 2026-11-02; source updated Not reported

Revision: 43a00f3a8b872cec01357925e9b5c50397bfe4e7611db7a0198ca7ab1e93a21f

Canonical: https://y2.dev/cve/CVE-2023-29007

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.