{"id":"CVE-2022-21687","aliases":["GHSA-rrp4-2xx3-mv29","GO-2022-0298"],"url":"https://o3.security/vulnerability/CVE-2022-21687","summary":"Command injection in gh-ost","details":"Gh-ost version <= 1.1.2 allows users to inject DSN strings via the `-database` parameter.\n\nThis is a low severity vulnerability as 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.\n\n### Impact\nThis issue may lead to arbitrary local file read.\n\n### Patches\nFixed in 1.1.3+.\n\n### Workarounds\nNone\n\n### References\n- https://advisory.dw1.io/51\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [github/gh-ost](http://github.com/github/gh-ost)","published":"2022-02-01T11:56:17Z","modified":"2026-08-12T03:51:45.493497842Z","cvss":{"score":6.8,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N"},"epss":{"score":0.01003,"percentile":0.59813,"asOf":"2026-08-23"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"github.com/github/gh-ost","fixedVersion":"1.1.3"}],"fix":{"url":"https://github.com/github/gh-ost/commit/a91ab042de013cfd8fbb633763438932d9080d8f","label":"github/gh-ost@a91ab04"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21687.json"},{"type":"ADVISORY","url":"https://github.com/github/gh-ost/security/advisories/GHSA-rrp4-2xx3-mv29"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21687"},{"type":"FIX","url":"https://github.com/github/gh-ost/commit/a91ab042de013cfd8fbb633763438932d9080d8f"},{"type":"PACKAGE","url":"https://github.com/github/gh-ost"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:45.493497842Z"}}