Skip to content
Heist/ feed
Back to feed
HighFix available

git — security advisory

Type: advisorySources: OSVAdvisory ID: ALPINE-CVE-2022-29187

Git is a distributed revision control system. Git prior to versions 2.37.1, 2.36.2, 2.35.4, 2.34.4, 2.33.4, 2.32.3, 2.31.4, and 2.30.5, is vulnerable to privilege escalation in all platforms. An unsuspecting user could still be affected by the issue reported in CVE-2022-24765, for example when navigating as root into a shared tmp directory that is owned by them, but where an attacker could create a git repository. Versions 2.37.1, 2.36.2, 2.35.4, 2.34.4, 2.33.4, 2.32.3, 2.31.4, and 2.30.5 contain a patch for this issue. The simplest way to avoid being affected by the exploit described in the example is to avoid running git as root (or an Administrator in Windows), and if needed to reduce its use to a minimum. While a generic workaround is not possible, a system could be hardened from the exploit described in the example by removing any such repository if it exists already and creating one as root to block any future attacks.

Products
git
Affected versions
Not specified
Fixed versions
2.30.5-r0, 2.32.3-r0, 2.34.4-r0, 2.36.2-r0, 2.37.1-r0
CVEs
CVE-2022-29187
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 14:11 UTC · Revision 1

Source evidence

ALPINE-CVE-2022-29187

core-osv · Original source

Published 12 Jul 2022, 21:15 UTC

Git is a distributed revision control system. Git prior to versions 2.37.1, 2.36.2, 2.35.4, 2.34.4, 2.33.4, 2.32.3, 2.31.4, and 2.30.5, is vulnerable to privilege escalation in all platforms. An unsuspecting user could still be affected by the issue reported in CVE-2022-24765, for example when navigating as root into a shared tmp directory that is owned by them, but where an attacker could create a git repository. Versions 2.37.1, 2.36.2, 2.35.4, 2.34.4, 2.33.4, 2.32.3, 2.31.4, and 2.30.5 contain a patch for this issue. The simplest way to avoid being affected by the exploit described in the example is to avoid running git as root (or an Administrator in Windows), and if needed to reduce its use to a minimum. While a generic workaround is not possible, a system could be hardened from the exploit described in the example by removing any such repository if it exists already and creating one as root to block any future attacks.

osv:ALPINE-CVE-2022-29187

git

Fixed versions: 2.30.5-r0

git

Fixed versions: 2.32.3-r0

git

Fixed versions: 2.34.4-r0

git

Fixed versions: 2.36.2-r0

git

Fixed versions: 2.37.1-r0

git

Fixed versions: 2.37.1-r0

git

Fixed versions: 2.37.1-r0

git

Fixed versions: 2.37.1-r0

git

Fixed versions: 2.37.1-r0

git

Fixed versions: 2.37.1-r0

git

Fixed versions: 2.37.1-r0

git

Fixed versions: 2.37.1-r0

Complete source record
{
  "id": "b9f1cff792bf4a157089034efb52f981ecb97f4b7ae7e15790080f87f9f60e8d",
  "url": "https://osv.dev/vulnerability/ALPINE-CVE-2022-29187",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ALPINE-CVE-2022-29187",
    "summary": "Git is a distributed revision control system. Git prior to versions 2.37.1, 2.36.2, 2.35.4, 2.34.4, 2.33.4, 2.32.3, 2.31.4, and 2.30.5, is vulnerable to privilege escalation in all platforms. An unsuspecting user could still be affected by the issue reported in CVE-2022-24765, for example when navigating as root into a shared tmp directory that is owned by them, but where an attacker could create a git repository. Versions 2.37.1, 2.36.2, 2.35.4, 2.34.4, 2.33.4, 2.32.3, 2.31.4, and 2.30.5 contain a patch for this issue. The simplest way to avoid being affected by the exploit described in the example is to avoid running git as root (or an Administrator in Windows), and if needed to reduce its use to a minimum. While a generic workaround is not possible, a system could be hardened from the exploit described in the example by removing any such repository if it exists already and creating one as root to block any future attacks.",
    "evidence": "osv:ALPINE-CVE-2022-29187",
    "products": [
      {
        "name": {
          "value": "git",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.30.5-r0",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "git",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.32.3-r0",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "git",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.34.4-r0",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "git",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.36.2-r0",
            "evidence": "/affected/3/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "git",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.37.1-r0",
            "evidence": "/affected/4/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "git",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.37.1-r0",
            "evidence": "/affected/5/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "git",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.37.1-r0",
            "evidence": "/affected/6/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "git",
          "evidence": "/affected/7/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.37.1-r0",
            "evidence": "/affected/7/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "git",
          "evidence": "/affected/8/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.37.1-r0",
            "evidence": "/affected/8/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "git",
          "evidence": "/affected/9/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.37.1-r0",
            "evidence": "/affected/9/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "git",
          "evidence": "/affected/10/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.37.1-r0",
            "evidence": "/affected/10/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "git",
          "evidence": "/affected/11/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.37.1-r0",
            "evidence": "/affected/11/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "ALPINE-CVE-2022-29187",
      "aliases": [
        "ALPINE-CVE-2022-29187"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.30.3"
                },
                {
                  "fixed": "2.30.5-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "git",
            "purl": "pkg:apk/alpine/git?arch=source",
            "ecosystem": "Alpine:v3.13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-29187.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.30.3"
                },
                {
                  "fixed": "2.32.3-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "git",
            "purl": "pkg:apk/alpine/git?arch=source",
            "ecosystem": "Alpine:v3.14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-29187.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.30.3"
                },
                {
                  "fixed": "2.34.4-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "git",
            "purl": "pkg:apk/alpine/git?arch=source",
            "ecosystem": "Alpine:v3.15"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-29187.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.30.3"
                },
                {
                  "fixed": "2.36.2-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "git",
            "purl": "pkg:apk/alpine/git?arch=source",
            "ecosystem": "Alpine:v3.16"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-29187.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.30.3"
                },
                {
                  "fixed": "2.37.1-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "git",
            "purl": "pkg:apk/alpine/git?arch=source",
            "ecosystem": "Alpine:v3.17"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-29187.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.30.3"
                },
                {
                  "fixed": "2.37.1-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "git",
            "purl": "pkg:apk/alpine/git?arch=source",
            "ecosystem": "Alpine:v3.18"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-29187.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.30.3"
                },
                {
                  "fixed": "2.37.1-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "git",
            "purl": "pkg:apk/alpine/git?arch=source",
            "ecosystem": "Alpine:v3.19"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-29187.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.30.3"
                },
                {
                  "fixed": "2.37.1-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "git",
            "purl": "pkg:apk/alpine/git?arch=source",
            "ecosystem": "Alpine:v3.20"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-29187.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.30.3"
                },
                {
                  "fixed": "2.37.1-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "git",
            "purl": "pkg:apk/alpine/git?arch=source",
            "ecosystem": "Alpine:v3.21"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-29187.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.30.3"
                },
                {
                  "fixed": "2.37.1-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "git",
            "purl": "pkg:apk/alpine/git?arch=source",
            "ecosystem": "Alpine:v3.22"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-29187.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.30.3"
                },
                {
                  "fixed": "2.37.1-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "git",
            "purl": "pkg:apk/alpine/git?arch=source",
            "ecosystem": "Alpine:v3.23"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-29187.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.30.3"
                },
                {
                  "fixed": "2.37.1-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "git",
            "purl": "pkg:apk/alpine/git?arch=source",
            "ecosystem": "Alpine:v3.24"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2022-29187.json"
          },
          "ecosystem_specific": {}
        }
      ],
      "modified": "2026-10-15T07:17:54.205490575Z",
      "provider": "osv",
      "upstream": [
        "CVE-2022-29187"
      ],
      "references": [
        "https://security.alpinelinux.org/vuln/CVE-2022-29187"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2022-29187",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 321828,
  "published_at": "2022-07-12T21:15:09.56+00:00"
}