{"id":"CVE-2022-2024","aliases":["GHSA-pfvh-p8qp-9ww9","GO-2023-1596"],"url":"https://o3.security/vulnerability/CVE-2022-2024","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 on case-insensitive file systems. All installations with [repository upload enabled (default)](https://github.com/gogs/gogs/blob/f36eeedbf89328ee70cc3a2e239f6314f9021f58/conf/app.ini#L127-L129) on case-insensitive file systems (Windows, macOS, etc.) are affected.\n\n### Patches\n\nMake sanitization of upload path to `.git` directory to be case-insensitive. Users should upgrade to 0.12.11 or the latest 0.13.0+dev.\n\n### Workarounds\n\nDisable [repository upload](https://github.com/gogs/gogs/blob/f36eeedbf89328ee70cc3a2e239f6314f9021f58/conf/app.ini#L127-L129).\n\n### References\n\nhttps://huntr.dev/bounties/18cf9256-23ab-4098-a769-85f8da130f97/\n\n### For more information\n\nIf you have any questions or comments about this advisory, please post on https://github.com/gogs/gogs/issues/7030.\n","published":"2023-02-25T00:00:00Z","modified":"2026-10-28T02:31:05.219281096Z","cvss":{"score":9.8,"severity":"CRITICAL","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},"epss":{"score":0.97839,"percentile":0.99903,"asOf":"2026-09-14"},"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"Go","name":"gogs.io/gogs","fixedVersion":"0.12.11"}],"fix":{"url":"https://github.com/gogs/gogs/commit/15d0d6a94be0098a8227b6b95bdf2daed105ec41","label":"gogs/gogs@15d0d6a"},"references":[{"type":"WEB","url":"https://huntr.dev/bounties/18cf9256-23ab-4098-a769-85f8da130f97"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/2xxx/CVE-2022-2024.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-2024"},{"type":"FIX","url":"https://github.com/gogs/gogs/commit/15d0d6a94be0098a8227b6b95bdf2daed105ec41"},{"type":"WEB","url":"https://github.com/gogs/gogs/security/advisories/GHSA-pfvh-p8qp-9ww9"},{"type":"WEB","url":"https://github.com/gogs/gogs/issues/7030"},{"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:31:05.219281096Z"}}