{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*",
            "extracted_events": [
              {
                "introduced": "3.1.30"
              },
              {
                "fixed": "3.1.47"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "CPE_RANGE",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "141cd651e459bff8919798b3ccf03dfa167757f6"
            },
            {
              "fixed": "4199cb89755f705801a4cb241723325b46201f51"
            }
          ],
          "repo": "https://github.com/gitpython-developers/gitpython",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-rpm5-65cw-6hj4"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-78"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42215.json"
  },
  "details": "GitPython is a python library used to interact with Git repositories. From version 3.1.30 to before version 3.1.47, GitPython blocks dangerous Git options such as --upload-pack and --receive-pack by default, but the equivalent Python kwargs upload_pack and receive_pack bypass that check. If an application passes attacker-controlled kwargs into Repo.clone_from(), Remote.fetch(), Remote.pull(), or Remote.push(), this leads to arbitrary command execution even when allow_unsafe_options is left at its default value of False. This issue has been patched in version 3.1.47.",
  "id": "CVE-2026-42215",
  "modified": "2026-07-08T05:38:16.208239587Z",
  "published": "2026-05-07T18:17:03.194Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/gitpython-developers/GitPython/releases/tag/3.1.47"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42215.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-rpm5-65cw-6hj4"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-42215"
    }
  ],
  "schema_version": "1.7.5",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "GitPython: Command injection via Git options bypass"
}