PT-2026-41958 · Go-Git · Go-Git

·

CVE-2026-45570

·

Published

2026-05-19

·

Updated

2026-07-30

CVSS v3.1

9.6

Critical

VectorAV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
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).

Exploit

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

CLEANSTART-2026-CP15003
CLEANSTART-2026-CV49545
CLEANSTART-2026-EH36582
CLEANSTART-2026-ES72297
CLEANSTART-2026-HO16255
CLEANSTART-2026-JW97006
CLEANSTART-2026-KL41807
CLEANSTART-2026-KQ90880
CLEANSTART-2026-MY68881
CLEANSTART-2026-OS93204
CLEANSTART-2026-QT53274
CLEANSTART-2026-VD09973
CLEANSTART-2026-VD47610
CLEANSTART-2026-WF25734
CLEANSTART-2026-WY21381
CVE-2026-45570
GHSA-M7CR-M3PV-HGRP
GO-2026-5496
OPENSUSE-SU-2026:10831-1
OPENSUSE-SU-2026:21483-1

Affected Products

Go-Git