{"id":"GHSA-rrp4-2xx3-mv29","summary":"Command injection in gh-ost","details":"Gh-ost version \u003c= 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)","aliases":["CVE-2022-21687","GO-2022-0298"],"modified":"2026-09-10T03:49:17.096352986Z","published":"2022-02-01T00:47:33Z","database_specific":{"cwe_ids":["CWE-20","CWE-74"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2022-01-31T20:45:59Z","nvd_published_at":"2022-02-01T12:15:00Z"},"references":[{"type":"WEB","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":"WEB","url":"https://github.com/github/gh-ost/commit/a91ab042de013cfd8fbb633763438932d9080d8f"},{"type":"PACKAGE","url":"https://github.com/github/gh-ost"}],"affected":[{"package":{"name":"github.com/github/gh-ost","ecosystem":"Go","purl":"pkg:golang/github.com/github/gh-ost"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.1.3"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/02/GHSA-rrp4-2xx3-mv29/GHSA-rrp4-2xx3-mv29.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N"}]}