{"id":"CVE-2022-0415","aliases":["CVE-2022-0415","GHSA-5gjh-5j4f-cpwv","GO-2022-0554"],"related":[],"kind":"vulnerability","state":"published","title":"Remote Command Execution in uploading repository file in gogs/gogs","summary":"Remote Command Execution in uploading repository file in GitHub repository gogs/gogs prior to 0.12.6.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Remote Command Execution in uploading repository file in GitHub repository gogs/gogs prior to 0.12.6.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Unrestricted Upload of File with Dangerous Type in Gogs in gogs.io/gogs","format":"markdown","source":"go"},{"lang":"es","text":"Una Ejecución de Comandos Remota en la carga de un archivo de repositorio en el repositorio de GitHub gogs/gogs versiones anteriores a 0.12.6","source":"nvd"}],"published":"2022-03-21T10:45:13.000Z","modified":"2026-06-17T04:20:33.710Z","severity":{"scorer":"@huntrdev","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"},"severities":[{"scorer":"@huntrdev","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-20","CWE-434"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"0.12.6","status":"affected"}],"vendor":"gogs","product":"gogs/gogs","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.12.6"}],"ecosystem":"Go","package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.12.6"}],"ecosystem":"Go","package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"go"},{"ranges":[{"status":"affected","fixed":"0.12.6"}],"vendor":"gogs","product":"gogs","cpe":"cpe:2.3:a:gogs:gogs:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://huntr.dev/bounties/b4928cfe-4110-462f-a180-6d5673797902","tags":["exploit","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gogs/gogs/commit/0fef3c9082269e9a4e817274942a5d7c50617284","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gogs/gogs/security/advisories/GHSA-5gjh-5j4f-cpwv","tags":["advisory","web"],"sources":["ghsa","go"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-0415","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/gogs/gogs/issues/6833","tags":["web"],"sources":["ghsa","go"]},{"url":"https://github.com/gogs/gogs/pull/6838","tags":["web"],"sources":["ghsa","go"]},{"url":"https://github.com/gogs/gogs","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"@huntrdev","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-0415","url":"https://www.cve.org/CVERecord?id=CVE-2022-0415","licence":"CVE Terms of Use","modified":"2024-08-02T23:25:40.311Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5gjh-5j4f-cpwv","url":"https://github.com/advisories/GHSA-5gjh-5j4f-cpwv","licence":"CC-BY-4.0","modified":"2024-08-21T15:26:55.091Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-0554","url":"https://pkg.go.dev/vuln/GO-2022-0554","licence":"CC-BY-4.0","modified":"2026-03-03T04:50:31.965Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-0415","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-0415","licence":"Public domain","modified":"2026-06-17T04:20:33.710Z"}],"updatedAt":"2026-11-25T22:58:10.207Z","epss":{"score":0.65935,"percentile":0.99284,"date":"2026-12-01T12:00:22.000Z"}}