{"id":"CVE-2022-21687","aliases":["EUVD-2022-1182","GHSA-rrp4-2xx3-mv29","GO-2022-0298"],"status":"published","title":"Command injection in gh-ost","description":"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.","severity":{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.01003,"percentile":0.63175,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20","CWE-74"],"published":"2022-02-01T00:47:33Z","modified":"2026-10-28T02:30:41Z","fixes":[{"ecosystem":"Go","package":"github.com/github/gh-ost","fixed_in":["1.1.3"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/github/gh-ost","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.1.3"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/github/gh-ost","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.1.3"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/github/gh-ost","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.1.3"}]}]}],"products":[{"vendor":"github","product":"gh-ost"}],"references":[{"url":"https://github.com/github/gh-ost/security/advisories/GHSA-rrp4-2xx3-mv29","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/github/gh-ost/commit/a91ab042de013cfd8fbb633763438932d9080d8f","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21687","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-rrp4-2xx3-mv29"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21687.json","tags":["advisory"]},{"url":"https://github.com/github/gh-ost","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2022-21687","title":"Command injection in gh-ost","description":"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.","status":"published","published":"2022-02-01T11:56:17Z","modified":"2025-05-05T16:34:00.348Z","cvss":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:34:29.478363Z"}],"euvd":[{"id":"EUVD-2022-1182","description":"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.","status":"published","published":"2022-02-01T11:56:17Z","modified":"2025-05-05T16:34:00Z","cvss":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T20:32:56.549702Z"}],"ghsa":[{"id":"GHSA-rrp4-2xx3-mv29","title":"Command injection in gh-ost","description":"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)","status":"published","published":"2022-02-01T00:47:33Z","modified":"2023-02-03T05:05:35Z","cvss":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-20","CWE-74"],"updated_at":"2026-11-02T14:36:42.703723Z"}],"nvd":[{"id":"CVE-2022-21687","description":"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.","status":"published","published":"2022-02-01T12:15:08.2Z","modified":"2026-06-17T04:26:45.853Z","cvss":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N","level":"medium","assessor":"secondary"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:P/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:07:11.52734Z"}],"osv":[{"id":"CVE-2022-21687","title":"Command injection in gh-ost","description":"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.","status":"published","published":"2022-02-01T11:56:17Z","modified":"2026-10-28T02:30:41.989132367Z","cvss":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:23.655778Z"},{"id":"GHSA-rrp4-2xx3-mv29","title":"Command injection in gh-ost","description":"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)","status":"published","published":"2022-02-01T00:47:33Z","modified":"2026-09-10T03:49:17.096352986Z","cvss":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-20","CWE-74"],"updated_at":"2026-11-02T15:46:56.281047Z"},{"id":"GO-2022-0298","title":"Command injection in gh-ost in github.com/github/gh-ost","description":"Command injection in gh-ost in github.com/github/gh-ost","status":"published","published":"2024-08-21T14:30:26Z","modified":"2026-03-03T04:49:38.894744Z","updated_at":"2026-11-02T15:47:00.604718Z"}]}}
