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

VectorAV: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

Weakness Enumeration

Related Identifiers

CVE-2026-45570
GHSA-M7CR-M3PV-HGRP
OPENSUSE-SU-2026:10831-1

Affected Products

Go-Git