Arbitrary Command Injection Affecting gogs.io/gogs/internal/db package, versions <0.12.8


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
1.79% (77th 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-GOGSIOGOGSINTERNALDB-2855297
  • published3 Jun 2022
  • disclosed2 Jun 2022
  • credit1135

Introduced: 2 Jun 2022

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

How to fix?

Upgrade gogs.io/gogs/internal/db to version 0.12.8 or higher.

Overview

Affected versions of this package are vulnerable to Arbitrary Command Injection by allowing a malicious user to upload a crafted config file into repository's .git directory and gain SSH access to the server. All Windows installations with repository upload enabled (default) are affected.

CVSS Base Scores

version 3.1