Vulnerability · Published Feb 1, 2022 · Assigned by GitHub_M
CVE-2022-21687Command injection in gh-ost
Medium 6.8
In plain English
A medium-severity improper input validation in the github.com/github/gh-ost package (Go). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.0% (higher than 63% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
gh-ost is a triggerless online schema migration solution for MySQL. Versions prior to 1.1.3 are subject to an arbitrary file read vulnerability. 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. The `-database` parameter does not properly sanitize user input which can lead to arbitrary file reads.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/github/gh-ost | 1.1.3 | GHSA-rrp4-2xx3-mv29 |
| Go | github.com/github/gh-ost | 1.1.3 | GO-2022-0298 |
Affected products (as reported)
Weakness: CWE-20 · Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N