Arbitrary Argument Injection Affecting gogs.io/gogs/internal/ssh package, versions <0.13.1-rc.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.05% (18th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GOGSIOGOGSINTERNALSSH-7424597
  • published5 Jul 2024
  • disclosed4 Jul 2024
  • creditswapgs

Introduced: 4 Jul 2024

CVE-2024-39930  (opens in a new tab)
CWE-88  (opens in a new tab)

How to fix?

Upgrade gogs.io/gogs/internal/ssh to version 0.13.1-rc.1 or higher.

Overview

gogs.io/gogs/internal/ssh is a painless self-hosted Git service

Affected versions of this package are vulnerable to Arbitrary Argument Injection via the --split-string env argument, which is handled by internal/ssh/ssh.go when the built-in SSH server is enabled. A user with a valid SSH private key can cause arbitrary code to be executed on the server.

Note: Only applications that use the env binary are vulnerable, which is not included in the Windows distribution or the default BusyBox distribution.

CVSS Scores

version 4.0
version 3.1