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


Severity

Recommended
0.0
high
0
10

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

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.46% (76th 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 Learn

Learn about Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GOGSIOGOGSINTERNALDB-2863517
  • published9 Jun 2022
  • disclosed8 Jun 2022
  • credit1135

Introduced: 8 Jun 2022

CVE-2022-1986  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

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

Overview

Affected versions of this package are vulnerable to Command Injection in the file editor, by uploading a specially crafted config file into the repository .git directory. Exploiting this vulnerability is possible when the attacker deletes the original ./git/config file and replace it with the crafted one.

CVSS Scores

version 3.1