Arbitrary Command Injection Affecting github.com/sourcegraph/sourcegraph-public-snapshot/cmd/gitserver/server package, versions <4.1.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
2.83% (87th 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-GITHUBCOMSOURCEGRAPHSOURCEGRAPHPUBLICSNAPSHOTCMDGITSERVERSERVER-10645544
  • published7 Jul 2025
  • disclosed23 Nov 2022
  • creditUnknown

Introduced: 23 Nov 2022

CVE-2022-41942  (opens in a new tab)
CWE-77  (opens in a new tab)

How to fix?

Upgrade github.com/sourcegraph/sourcegraph-public-snapshot/cmd/gitserver/server to version 4.1.0 or higher.

Overview

Affected versions of this package are vulnerable to Arbitrary Command Injection via the host parameter on the /list-gitolite endpoint. An attacker can inject commands by sending local requests to the vulnerable endpoint.

References

CVSS Base Scores

version 3.1