{"id":"CVE-2022-0415","aliases":["GHSA-5gjh-5j4f-cpwv","GO-2022-0554"],"url":"https://o3.security/vulnerability/CVE-2022-0415","summary":"Remote Command Execution in uploading repository file in gogs/gogs","details":"### Impact\n\nThe malicious user is able to upload a crafted `config` file into repository's `.git` directory with 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\nRepository file uploads are prohibited to its `.git` directory. Users should upgrade to 0.12.6 or the latest 0.13.0+dev.\n\n### Workarounds\n\n[Disable repository files upload](https://github.com/gogs/gogs/blob/f36eeedbf89328ee70cc3a2e239f6314f9021f58/conf/app.ini#L128-L129).\n\n### References\n\nhttps://huntr.dev/bounties/b4928cfe-4110-462f-a180-6d5673797902/\n\n### For more information\n\nIf you have any questions or comments about this advisory, please post on #6833.\n","published":"2022-03-21T10:45:13Z","modified":"2026-08-12T03:51:21.092357191Z","cvss":{"score":9.9,"severity":"CRITICAL","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"},"epss":{"score":0.65237,"percentile":0.99222,"asOf":"2026-08-23"},"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"Go","name":"gogs.io/gogs","fixedVersion":"0.12.6"}],"fix":{"url":"https://github.com/gogs/gogs/commit/0fef3c9082269e9a4e817274942a5d7c50617284","label":"gogs/gogs@0fef3c9"},"references":[{"type":"WEB","url":"https://huntr.dev/bounties/b4928cfe-4110-462f-a180-6d5673797902"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/0xxx/CVE-2022-0415.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-0415"},{"type":"FIX","url":"https://github.com/gogs/gogs/commit/0fef3c9082269e9a4e817274942a5d7c50617284"},{"type":"WEB","url":"https://github.com/gogs/gogs/security/advisories/GHSA-5gjh-5j4f-cpwv"},{"type":"WEB","url":"https://github.com/gogs/gogs/issues/6833"},{"type":"WEB","url":"https://github.com/gogs/gogs/pull/6838"},{"type":"PACKAGE","url":"https://github.com/gogs/gogs"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:21.092357191Z"}}