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


0.0
high

Snyk CVSS

    Attack Complexity Low
    Confidentiality High
    Integrity High
    Availability High

    Threat Intelligence

    Exploit Maturity Proof of concept
    EPSS 0.25% (65th percentile)
Expand this section
NVD
9.8 critical

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 ID SNYK-GOLANG-GOGSIOGOGSINTERNALDB-2863517
  • published 9 Jun 2022
  • disclosed 8 Jun 2022
  • credit 1135

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.