CVE-2022-21687Github Gh-ost
Medium 6.5 No auth needed
Follow: this CVE · Github · Github Gh-ost We alert you by email or Slack (account required).
- Priority
- 54
- CVSS 3.1
- 6.5
- EPSS
- 1.1% probability of exploitation in 30 days · percentile 65
- Auth required
- No
- Published
- Feb 1, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-20
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
What happens
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.
What to do
- Apply the vendor's security update for Gh-ost.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Go | github.com/github/gh-ost |
< 1.1.3 |
1.1.3 |
go get github.com/github/gh-ost@v1.1.3 |
| Go | github.com/github/gh-ost |
< 1.1.3 |
1.1.3 |
go get github.com/github/gh-ost@v1.1.3 |
Per OSV / GitHub Advisories (GHSA-rrp4-2xx3-mv29, GO-2022-0298). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| github | gh-ost | < 1.1.3 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Third Party Advisory