PT-2026-41958 · Go-Git · Go-Git
N0Zom1Z0
·
Published
2026-05-19
·
Updated
2026-05-27
·
CVE-2026-45570
CVSS v4.0
2.3
Low
| Vector | AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:L |
Name of the Vulnerable Software and Affected Versions
go-git versions prior to v5
Description
The SSH transport in go-git constructs the remote exec command by wrapping the repository path in single quotes but fails to escape single quotes embedded within that path. This allows a repository path containing a single quote to break out of the quoted region and append additional shell tokens. On SSH servers that evaluate the exec command through a shell, such as those using
/bin/sh, /bin/bash, or a ForceCommand wrapper that re-evaluates $SSH ORIGINAL COMMAND, these tokens execute within the account's command-execution context. This issue occurs on the SSH server side, but go-git can act as a vehicle for reaching such servers through attacker-influenced repository paths.Recommendations
Upgrade to a supported version of go-git (v5 or later).
Fix
Improper Encoding or Escaping of Output
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Go-Git