{"id":"CVE-2022-1986","aliases":["GHSA-67mx-jc2f-jgjm","GO-2022-0556"],"url":"https://o3.security/vulnerability/CVE-2022-1986","summary":"OS Command Injection in gogs/gogs","details":"### 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","published":"2022-06-09T03:35:11Z","modified":"2026-10-28T02:30:28.556527392Z","cvss":{"score":10,"severity":"CRITICAL","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"},"epss":{"score":0.04419,"percentile":0.90647,"asOf":"2026-08-23"},"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"Go","name":"gogs.io/gogs","fixedVersion":"0.12.9"}],"fix":{"url":"https://github.com/gogs/gogs/commit/38aff73251cc46ced96dd608dab6190415032a82","label":"gogs/gogs@38aff73"},"references":[{"type":"WEB","url":"https://huntr.dev/bounties/776e8f29-ff5e-4501-bb9f-0bd335007930"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/1xxx/CVE-2022-1986.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-1986"},{"type":"FIX","url":"https://github.com/gogs/gogs/commit/38aff73251cc46ced96dd608dab6190415032a82"},{"type":"WEB","url":"https://github.com/gogs/gogs/security/advisories/GHSA-67mx-jc2f-jgjm"},{"type":"PACKAGE","url":"https://github.com/gogs/gogs"},{"type":"WEB","url":"https://github.com/gogs/gogs/blob/f36eeedbf89328ee70cc3a2e239f6314f9021f58/conf/app.ini#L127-L129"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:28.556527392Z"}}