Skip to content
Heist/ feed
Back to feed
Medium

golang-github-go-git-go-git, golang-github-go-git-go-git-v6 — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2026-71557

go-git is an extensible git implementation library written in pure Go. Prior to 5.19.2 and 6.0.0-alpha.5, reference names are not sanitized before being used to construct on-disk paths under the reference storage directory, so a maliciously crafted reference name (for example containing directory-traversal sequences) can cause go-git to write files outside the intended reference storage directory. Versions 5.19.2 and 6.0.0-alpha.5 fix the issue.

Products
golang-github-go-git-go-git, golang-github-go-git-go-git-v6
Affected versions
5.14.0-1, 5.16.2-1, 5.16.2-1ubuntu0.1~esm1, 5.19.1-1, 5.19.2-1, 5.4.2-3, 5.4.2-3build1, 5.4.2-3ubuntu0.1~esm1, 5.4.2-3ubuntu0.1~esm2, 5.4.2-4, 5.4.2-4ubuntu0.24.04.1, 5.4.2-4ubuntu0.24.04.2, 5.4.2-4ubuntu0.24.04.2+esm1, 5.4.2-4ubuntu0.24.04.3, 5.4.2-4ubuntu0.24.04.3+esm1, 5.4.2-4ubuntu0.24.04.3+esm2, 5.4.2-4ubuntu0.24.04.3+esm3, 6.0.0~alpha.4-1, 6.0.0~alpha.4-2, 6.0.0~alpha.5-1, 6.0.0~alpha.5-2
Fixed versions
Not specified
CVEs
CVE-2026-71557
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 03:15 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-71557

core-osv · Original source

Published 7 Aug 2026, 17:17 UTC

go-git is an extensible git implementation library written in pure Go. Prior to 5.19.2 and 6.0.0-alpha.5, reference names are not sanitized before being used to construct on-disk paths under the reference storage directory, so a maliciously crafted reference name (for example containing directory-traversal sequences) can cause go-git to write files outside the intended reference storage directory. Versions 5.19.2 and 6.0.0-alpha.5 fix the issue.

osv:UBUNTU-CVE-2026-71557

golang-github-go-git-go-git

Fixed versions: Not specified

golang-github-go-git-go-git

Fixed versions: Not specified

golang-github-go-git-go-git

Fixed versions: Not specified

golang-github-go-git-go-git-v6

Fixed versions: Not specified

golang-github-go-git-go-git

Fixed versions: Not specified

Complete source record
{
  "id": "634adb982836bb4c65e7952d9af6155911398c880ea5dfff17910a91374259b5",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-71557",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-71557",
    "summary": "go-git is an extensible git implementation library written in pure Go. Prior to 5.19.2 and 6.0.0-alpha.5, reference names are not sanitized before being used to construct on-disk paths under the reference storage directory, so a maliciously crafted reference name (for example containing directory-traversal sequences) can cause go-git to write files outside the intended reference storage directory. Versions 5.19.2 and 6.0.0-alpha.5 fix the issue.",
    "evidence": "osv:UBUNTU-CVE-2026-71557",
    "products": [
      {
        "name": {
          "value": "golang-github-go-git-go-git",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "5.4.2-3",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "5.4.2-3ubuntu0.1~esm1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "5.4.2-3ubuntu0.1~esm2",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "golang-github-go-git-go-git",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "5.4.2-3build1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "5.4.2-4",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "5.4.2-4ubuntu0.24.04.1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "5.4.2-4ubuntu0.24.04.2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "5.4.2-4ubuntu0.24.04.2+esm1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "5.4.2-4ubuntu0.24.04.3",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "5.4.2-4ubuntu0.24.04.3+esm1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "5.4.2-4ubuntu0.24.04.3+esm2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "5.4.2-4ubuntu0.24.04.3+esm3",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "golang-github-go-git-go-git",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "5.16.2-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "5.19.1-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "5.19.2-1",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "golang-github-go-git-go-git-v6",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "6.0.0~alpha.4-1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "6.0.0~alpha.4-2",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "6.0.0~alpha.5-1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "6.0.0~alpha.5-2",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "golang-github-go-git-go-git",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "5.14.0-1",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "5.16.2-1",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "5.16.2-1ubuntu0.1~esm1",
            "evidence": "/affected/4/versions"
          }
        ]
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "UBUNTU-CVE-2026-71557",
      "aliases": [
        "UBUNTU-CVE-2026-71557"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-github-go-git-go-git",
            "purl": "pkg:deb/ubuntu/golang-github-go-git-go-git?arch=source&distro=esm-apps%2Fjammy",
            "ecosystem": "Ubuntu:Pro:22.04:LTS"
          },
          "versions": [
            "5.4.2-3",
            "5.4.2-3ubuntu0.1~esm1",
            "5.4.2-3ubuntu0.1~esm2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71557.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "go-git",
                "binary_version": "5.4.2-3ubuntu0.1~esm2"
              },
              {
                "binary_name": "golang-github-go-git-go-git-dev",
                "binary_version": "5.4.2-3ubuntu0.1~esm2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-github-go-git-go-git",
            "purl": "pkg:deb/ubuntu/golang-github-go-git-go-git?arch=source&distro=esm-apps%2Fnoble",
            "ecosystem": "Ubuntu:Pro:24.04:LTS"
          },
          "versions": [
            "5.4.2-3build1",
            "5.4.2-4",
            "5.4.2-4ubuntu0.24.04.1",
            "5.4.2-4ubuntu0.24.04.2",
            "5.4.2-4ubuntu0.24.04.2+esm1",
            "5.4.2-4ubuntu0.24.04.3",
            "5.4.2-4ubuntu0.24.04.3+esm1",
            "5.4.2-4ubuntu0.24.04.3+esm2",
            "5.4.2-4ubuntu0.24.04.3+esm3"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71557.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "go-git",
                "binary_version": "5.4.2-4ubuntu0.24.04.3+esm3"
              },
              {
                "binary_name": "golang-github-go-git-go-git-dev",
                "binary_version": "5.4.2-4ubuntu0.24.04.3+esm3"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-github-go-git-go-git",
            "purl": "pkg:deb/ubuntu/golang-github-go-git-go-git?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "5.16.2-1",
            "5.19.1-1",
            "5.19.2-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71557.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "go-git",
                "binary_version": "5.19.2-1"
              },
              {
                "binary_name": "golang-github-go-git-go-git-dev",
                "binary_version": "5.19.2-1"
              },
              {
                "binary_name": "golang-github-go-git-go-git-v5-dev",
                "binary_version": "5.19.2-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-github-go-git-go-git-v6",
            "purl": "pkg:deb/ubuntu/golang-github-go-git-go-git-v6?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "6.0.0~alpha.4-1",
            "6.0.0~alpha.4-2",
            "6.0.0~alpha.5-1",
            "6.0.0~alpha.5-2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71557.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "golang-github-go-git-go-git-v6-dev",
                "binary_version": "6.0.0~alpha.5-2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-github-go-git-go-git",
            "purl": "pkg:deb/ubuntu/golang-github-go-git-go-git?arch=source&distro=esm-apps%2Fresolute",
            "ecosystem": "Ubuntu:Pro:26.04:LTS"
          },
          "versions": [
            "5.14.0-1",
            "5.16.2-1",
            "5.16.2-1ubuntu0.1~esm1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71557.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "go-git",
                "binary_version": "5.16.2-1ubuntu0.1~esm1"
              },
              {
                "binary_name": "golang-github-go-git-go-git-dev",
                "binary_version": "5.16.2-1ubuntu0.1~esm1"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T13:00:47.225834475Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-71557"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-71557",
        "https://www.cve.org/CVERecord?id=CVE-2026-71557",
        "https://github.com/go-git/go-git/commit/4a0e66d555de5f9a30c31e2df64f445f42bd01e7",
        "https://github.com/go-git/go-git/commit/da9f7d8a0e98b475600177348d6ece384a370f36",
        "https://github.com/go-git/go-git/pull/2247",
        "https://github.com/go-git/go-git/pull/2254",
        "https://github.com/go-git/go-git/releases/tag/v5.19.2",
        "https://github.com/go-git/go-git/releases/tag/v6.0.0-alpha.5",
        "https://github.com/go-git/go-git/security/advisories/GHSA-qgq7-7hm3-q39j"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-71557",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 360835,
  "published_at": "2026-08-07T17:17:00+00:00"
}