CVE-2026-45570 Details
Description
go-git is an extensible git implementation library written in pure Go. Prior to 5.19.1 and 6.0.0-alpha.4, go-git's SSH transport constructs the remote exec command by wrapping the repository path in single quotes without escaping single quotes embedded inside the path. A repository path containing a single quote can therefore break out of the quoted region in the exec command and be appended as additional shell tokens. This vulnerability is fixed in 5.19.1 and 6.0.0-alpha.4.
A vulnerability exists in go-git's SSH transport in versions prior to 5.19.1 and 6.0.0-alpha.4. The issue arises because the SSH transport constructs the remote exec command by wrapping the repository path in single quotes, but fails to properly escape single quotes embedded within the path. This flaw allows a repository path containing a single quote to break out of the quoted region and be appended as additional shell tokens. On SSH servers that evaluate the exec command through a shell, these extra tokens could execute in the context of the user's command execution environment. The vulnerability has been addressed in go-git versions 5.19.1 and 6.0.0-alpha.4.
Users should upgrade to go-git version 5.19.1 or 6.0.0-alpha.4. For versions prior to v5, users are recommended to upgrade to a supported go-git version.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed May 28, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/go-git/go-git/security/advisories/GHSA-m7cr-m3pv-hgrp | [email protected] | Vendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-116 | Improper Encoding or Escaping of Output | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| go-git project go-git | < 5.19.1 6.0.0 alpha1 6.0.0 alpha2 6.0.0 alpha3 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 4, 2026 | Initial Analysis | [email protected] |
| May 27, 2026 | New CVE Received | [email protected] |