Arbitrary Code Execution Affecting gogs.io/gogs/internal/db package, versions <0.12.6


Severity

Recommended
0.0
critical
0
10

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

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
20.91% (97th 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 Arbitrary Code Execution vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GOGSIOGOGSINTERNALDB-2430406
  • published21 Mar 2022
  • disclosed21 Mar 2022
  • creditE99p1ant

Introduced: 21 Mar 2022

CVE-2022-0415  (opens in a new tab)
CWE-20  (opens in a new tab)

How to fix?

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

Overview

Affected versions of this package are vulnerable to Arbitrary Code Execution via file upload, due to improper validation of the tree_path parameter. An attacker can set tree_path=/.git/ to upload files into the .git directory.

CVSS Scores

version 3.1