CVE-2022-21687
MEDIUM 6.5CVSS 3.1Command injection in gh-ost
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.
- Published
- 1 Feb 2022
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-20CWE-74
- Also known as
- GHSA-rrp4-2xx3-mv29GO-2022-0298
- Sources
- NVDJSONOSV GHSA-rrp4-2xx3-mv29JSONOSV GO-2022-0298JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.8 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.8 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.3 | AV:N/AC:M/Au:N/C:P/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | github | gh-ostcpe:2.3:a:github:gh-ost:*:*:*:*:*:*:*:* |
< 1.1.3 | 1.1.3 |
| OSV | Go | github.com/github/gh-ost | < 1.1.3 | 1.1.3 |
References
- https://github.com/github/gh-ost/commit/a91ab042de013cfd8fbb633763438932d9080d8f · Patch, Third Party Advisory, WEB, FIX
- https://github.com/github/gh-ost/security/advisories/GHSA-rrp4-2xx3-mv29 · Third Party Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2022-21687 · ADVISORY
- https://github.com/github/gh-ost · PACKAGE
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 1 Feb 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 21 Aug 2024)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 1 Feb 2022)