{"id":"CVE-2022-1986","aliases":["EUVD-2022-5955","GHSA-67mx-jc2f-jgjm","GO-2022-0556"],"status":"published","title":"OS Command Injection in gogs/gogs","description":"OS Command Injection in GitHub repository gogs/gogs prior to 0.12.9.","severity":{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-07","score":0.04216,"percentile":0.91047,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-78"],"published":"2022-06-08T22:34:21Z","modified":"2026-10-28T02:30:28Z","fixes":[{"ecosystem":"Go","package":"gogs.io/gogs","fixed_in":["0.12.9"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"gogs.io/gogs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.12.9"}]}]},{"source":"osv","ecosystem":"Go","package":"gogs.io/gogs","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.12.9"}]}]},{"source":"osv","ecosystem":"Go","package":"gogs.io/gogs","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.12.9"}]}]}],"products":[{"vendor":"gogs","product":"gogs"},{"vendor":"gogs","product":"gogs/gogs"}],"references":[{"url":"https://huntr.dev/bounties/776e8f29-ff5e-4501-bb9f-0bd335007930","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Third Party Advisory","web"]},{"url":"https://github.com/gogs/gogs/commit/38aff73251cc46ced96dd608dab6190415032a82","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/gogs/gogs/security/advisories/GHSA-67mx-jc2f-jgjm","tags":["web","advisory"]},{"url":"https://github.com/gogs/gogs/blob/f36eeedbf89328ee70cc3a2e239f6314f9021f58/conf/app.ini#L127-L129","tags":["web"]},{"url":"https://huntr.dev/bounties/776e8f29-ff5e-4501-bb9f-0bd335007930/"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-1986","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-67mx-jc2f-jgjm"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/1xxx/CVE-2022-1986.json","tags":["advisory"]},{"url":"https://github.com/gogs/gogs","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2022-1986","title":"OS Command Injection in gogs/gogs","description":"OS Command Injection in GitHub repository gogs/gogs prior to 0.12.9.","status":"published","published":"2022-06-09T03:35:11Z","modified":"2024-08-03T00:24:44.142Z","cvss":[{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"cna"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T14:34:38.922686Z"}],"euvd":[{"id":"EUVD-2022-5955","description":"OS Command Injection in GitHub repository gogs/gogs prior to 0.12.9.","status":"published","published":"2022-06-09T03:35:11Z","modified":"2024-08-03T00:24:44Z","cvss":[{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-03T03:25:58.940602Z"}],"ghsa":[{"id":"GHSA-67mx-jc2f-jgjm","title":"OS Command Injection in file editor in Gogs","description":"### Impact\n\nThe malicious user is able to update a crafted `config` file into repository's `.git` directory in combination with crafted file deletion to gain SSH access to the server. All installations with [repository upload enabled (default)](https://github.com/gogs/gogs/blob/f36eeedbf89328ee70cc3a2e239f6314f9021f58/conf/app.ini#L127-L129) are affected.\n\n### Patches\n\nFile deletions are prohibited to repository's `.git` directory. Users should upgrade to 0.12.9 or the latest 0.13.0+dev.\n\n### Workarounds\n\nN/A\n\n### References\n\nhttps://huntr.dev/bounties/776e8f29-ff5e-4501-bb9f-0bd335007930/\n\n### For more information\n\nIf you have any questions or comments about this advisory, please post on #7000.\n","status":"published","published":"2022-06-08T22:34:21Z","modified":"2023-01-27T05:03:46Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T14:36:20.144464Z"}],"nvd":[{"id":"CVE-2022-1986","description":"OS Command Injection in GitHub repository gogs/gogs prior to 0.12.9.","status":"published","published":"2022-06-09T17:15:08.627Z","modified":"2026-06-17T04:23:28.337Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"secondary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T14:07:21.62951Z"}],"osv":[{"id":"CVE-2022-1986","title":"OS Command Injection in gogs/gogs","description":"OS Command Injection in GitHub repository gogs/gogs prior to 0.12.9.","status":"published","published":"2022-06-09T03:35:11Z","modified":"2026-10-28T02:30:28.556527392Z","cvss":[{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T15:44:23.655778Z"},{"id":"GHSA-67mx-jc2f-jgjm","title":"OS Command Injection in file editor in Gogs","description":"### Impact\n\nThe malicious user is able to update a crafted `config` file into repository's `.git` directory in combination with crafted file deletion to gain SSH access to the server. All installations with [repository upload enabled (default)](https://github.com/gogs/gogs/blob/f36eeedbf89328ee70cc3a2e239f6314f9021f58/conf/app.ini#L127-L129) are affected.\n\n### Patches\n\nFile deletions are prohibited to repository's `.git` directory. Users should upgrade to 0.12.9 or the latest 0.13.0+dev.\n\n### Workarounds\n\nN/A\n\n### References\n\nhttps://huntr.dev/bounties/776e8f29-ff5e-4501-bb9f-0bd335007930/\n\n### For more information\n\nIf you have any questions or comments about this advisory, please post on #7000.\n","status":"published","published":"2022-06-08T22:34:21Z","modified":"2024-08-21T15:26:55.510827Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T15:46:39.266402Z"},{"id":"GO-2022-0556","title":"OS Command Injection in file editor in Gogs in gogs.io/gogs","description":"OS Command Injection in file editor in Gogs in gogs.io/gogs","status":"published","published":"2024-08-21T15:11:36Z","modified":"2026-03-03T04:50:32.527198Z","updated_at":"2026-11-02T15:47:00.918515Z"}]}}
