# CVE-2022-21687: Command injection in gh-ost

- Severity: Medium 6.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.04%, higher than 64% of CVEs (2026-12-01)
- Published: 2022-02-01T00:47:33.000Z
- Modified: 2026-09-10T03:49:17.096Z
- Also known as: GHSA-rrp4-2xx3-mv29, GO-2022-0298
- Weaknesses: CWE-20, CWE-74
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- github.com/github/gh-ost (Go): before 1.1.3
- github gh-ost: before 1.1.3

## Every score

- GitHub_M: CVSS:3.1 6.8 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N`
- GitHub: CVSS:3.1 6.8 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:P/I:N/A:N`

## References

- <https://github.com/github/gh-ost/security/advisories/GHSA-rrp4-2xx3-mv29> (advisory, third-party-advisory, web)
- <https://github.com/github/gh-ost/commit/a91ab042de013cfd8fbb633763438932d9080d8f> (fix, patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-21687> (advisory)
- <https://github.com/github/gh-ost> (package)

## Sources

- CVE List: [CVE-2022-21687](https://www.cve.org/CVERecord?id=CVE-2022-21687), CVE Terms of Use, modified 2025-05-05
- GitHub Advisory Database: [GHSA-rrp4-2xx3-mv29](https://github.com/advisories/GHSA-rrp4-2xx3-mv29), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2022-0298](https://pkg.go.dev/vuln/GO-2022-0298), CC-BY-4.0, modified 2026-03-03
- NVD: [CVE-2022-21687](https://nvd.nist.gov/vuln/detail/CVE-2022-21687), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-21687 · Whole record: https://cve.day/CVE-2022-21687.json · Rebuilt by cve.day 2026-11-25T22:58:09.454Z
