Description
go-git is an extensible git implementation library written in pure Go. Prior to versions 5.18.0 and 6.0.0-alpha.2, go-git may leak HTTP authentication credentials when following redirects during smart-HTTP clone and fetch operations. This issue has been patched in versions 5.18.0 and 6.0.0-alpha.2.
Published: 2026-05-08
Score: 4.7 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

go-git, a Go implementation of Git, may inadvertently expose HTTP authentication credentials when it follows redirects during smart‑HTTP clone and fetch operations. The vulnerability allows end‑to‑end authentication details to be leaked to an unintended host, enabling an attacker to capture or reuse those credentials for unauthorized access to the remote repository. This issue falls under CWE‑522, Credential Exposure Through Missing Permissions, and also involves CWE‑601, Redirection to Untrusted Site.

Affected Systems

The affected component is the go‑git library, version 5.x before 5.18.0 and version 6.0.0‑alpha.2 before that release. Applications that embed go‑git and perform Git operations over HTTP or HTTPS that automatically follow redirects are impacted. Any project or service that imports go‑git to clone or fetch repositories is potentially vulnerable if the underlying library version is not up to date.

Risk and Exploitability

The CVSS score of 4.7 indicates a moderate severity. The EPSS score is 0.00057, indicating a very low but non‑zero exploitation probability, and the vulnerability is not listed in the CISA KEV catalog. The vulnerability relates to CWE‑522 and CWE‑601. The likely attack vector involves an attacker controlling a redirect chain during a clone or fetch operation; the attacker would need influence over the initial repository URL or the server issuing the redirect. Exploitation would require network access to the client performing the Git operation. Although exploitation is not trivial and would typically require a targeted scenario, credential leakage poses significant risk in environments where sensitive credentials are transmitted over HTTP. The risk level is moderate, but organizations should still treat it as a priority to mitigate potential credential compromise.

Generated by OpenCVE AI on May 16, 2026 at 01:52 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade go‑git to version 5.18.0 or later, or to 6.0.0‑alpha.2 or newer, to receive the patch that prevents credential leaks during redirects.
  • Disable automatic following of redirects in go‑git configuration or use a custom HTTP client that rejects redirects during smart‑HTTP clone and fetch operations.
  • Rotate any HTTP authentication credentials that may have been exposed and enforce the use of HTTPS for Git operations.

Generated by OpenCVE AI on May 16, 2026 at 01:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-3xc5-wrhm-f963 go-git: Credential leak via cross-host redirect in smart HTTP transport
History

Sat, 16 May 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-601
References
Metrics threat_severity

None

threat_severity

Moderate


Tue, 12 May 2026 14:45:00 +0000

Type Values Removed Values Added
First Time appeared Go-git Project
Go-git Project go-git
CPEs cpe:2.3:a:go-git_project:go-git:*:*:*:*:*:go:*:*
cpe:2.3:a:go-git_project:go-git:6.0.0:alpha1:*:*:*:go:*:*
Vendors & Products Go-git Project
Go-git Project go-git

Mon, 11 May 2026 19:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 08 May 2026 21:15:00 +0000

Type Values Removed Values Added
First Time appeared Go-git
Go-git go-git
Vendors & Products Go-git
Go-git go-git

Fri, 08 May 2026 14:00:00 +0000

Type Values Removed Values Added
Description go-git is an extensible git implementation library written in pure Go. Prior to versions 5.18.0 and 6.0.0-alpha.2, go-git may leak HTTP authentication credentials when following redirects during smart-HTTP clone and fetch operations. This issue has been patched in versions 5.18.0 and 6.0.0-alpha.2.
Title go-git Credential leak via cross-host redirect in smart HTTP transport
Weaknesses CWE-522
References
Metrics cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N'}


Subscriptions

Go-git Go-git
Go-git Project Go-git
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-11T18:50:50.673Z

Reserved: 2026-04-20T18:18:50.681Z

Link: CVE-2026-41506

cve-icon Vulnrichment

Updated: 2026-05-11T18:50:36.553Z

cve-icon NVD

Status : Analyzed

Published: 2026-05-08T14:16:33.983

Modified: 2026-05-12T14:33:02.040

Link: CVE-2026-41506

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-05-08T13:43:19Z

Links: CVE-2026-41506 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-05-16T02:00:12Z

Weaknesses
  • CWE-522

    Insufficiently Protected Credentials

  • CWE-601

    URL Redirection to Untrusted Site ('Open Redirect')