Command injection in gh-ost
Key facts
- Attack vector
- Network
- Privileges required
- High
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
| — | github.com/github/gh-ost (Go) | before 1.1.3 | 1.1.3 | Patch available | GHSA-rrp4-2xx3-mv29 |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- github.com/github/gh-ost (Go) Vendor— Affected before 1.1.3 Fixed in 1.1.3 Patch available GHSA-rrp4-2xx3-mv29
Remediation
- Fix · GHSA-rrp4-2xx3-mv29 github.com/github/gh-ost (Go) Fixed in 1.1.3 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2022-21687
- 2026-10-03 Alias added: GHSA-rrp4-2xx3-mv29
References
Sources
- CVE-2022-21687 · CVE Program
- CVE-2022-21687 · NVD
- FIRST EPSS
- GHSA-rrp4-2xx3-mv29 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences