Command Injection Affecting github.com/github/gh-ost/go/cmd/gh-ost package, versions <1.1.3


Severity

Recommended
0.0
medium
0
10

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

Threat Intelligence

EPSS
0.13% (49th 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-GITHUBCOMGITHUBGHOSTGOCMDGHOST-2388978
  • published1 Feb 2022
  • disclosed1 Feb 2022
  • creditdwisiswant0

Introduced: 1 Feb 2022

CVE-2022-21687  (opens in a new tab)
CWE-74  (opens in a new tab)

How to fix?

Upgrade github.com/github/gh-ost/go/cmd/gh-ost to version 1.1.3 or higher.

Overview

github.com/github/gh-ost/go/cmd/gh-ost is a triggerless online schema migration solution for MySQL. It is testable and provides pausability, dynamic control/reconfiguration, auditing, and many operational perks.

Affected versions of this package are vulnerable to Command Injection by injecting DSN strings through the -database parameter, which may lead to reading of arbitrary files.

Note: For this to be exploitable, the attacker must have access to the target host or trick an administrator into executing a malicious gh-ost command on a host running gh-ost, plus network access from host running gh-ost to the attack's malicious MySQL server.

References

CVSS Scores

version 3.1