{"id":"CVE-2022-30781","aliases":["ALPINE-CVE-2022-30781","BIT-gitea-2022-30781","EUVD-2022-4684","GHSA-p5f9-c9j9-g8qx","GO-2022-0450"],"status":"published","title":"Shell command injection in gitea","description":"Gitea before 1.16.7 does not escape git fetch remote.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.8793,"percentile":0.99767,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-116"],"published":"2022-05-16T00:00:00Z","modified":"2026-11-03T07:31:15Z","exploits":[{"source":"metasploit","id":"exploit/multi/http/gitea_git_fetch_rce","title":"Gitea Git Fetch Remote Code Execution","type":"exploit","platform":"Linux,Unix,Windows","date":"2022-05-16","verified":true,"url":"https://www.rapid7.com/db/modules/exploit/multi/http/gitea_git_fetch_rce"},{"source":"pocgithub","id":"wuhan005/CVE-2022-30781","title":"wuhan005/CVE-2022-30781","date":"2022-05-22","url":"https://github.com/wuhan005/CVE-2022-30781"},{"source":"exploitdb","id":"EDB-51009","title":"Gitea 1.16.6 - Remote Code Execution (RCE) (Metasploit)","type":"webapps","platform":"multiple","date":"2022-09-15","verified":true,"url":"https://www.exploit-db.com/exploits/51009"},{"source":"pocgithub","id":"403ArkhamS3c/cve-gitea","title":"403ArkhamS3c/cve-gitea","date":"2026-10-28","url":"https://github.com/403ArkhamS3c/cve-gitea"}],"fixes":[{"ecosystem":"Go","package":"code.gitea.io/gitea","fixed_in":["1.16.7"],"sources":["ghsa","osv"]},{"ecosystem":"Alpine:v3.16","package":"gitea","fixed_in":["1.16.7-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.17","package":"gitea","fixed_in":["1.16.7-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.18","package":"gitea","fixed_in":["1.16.7-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.19","package":"gitea","fixed_in":["1.16.7-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.20","package":"gitea","fixed_in":["1.16.7-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.21","package":"gitea","fixed_in":["1.16.7-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.22","package":"gitea","fixed_in":["1.16.7-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.23","package":"gitea","fixed_in":["1.16.7-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.24","package":"gitea","fixed_in":["1.16.7-r0"],"sources":["osv"]},{"ecosystem":"Bitnami","package":"gitea","fixed_in":["1.16.7"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"code.gitea.io/gitea","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.16.7"}]}]},{"source":"osv","ecosystem":"Alpine:v3.16","package":"gitea","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.16.7-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.17","package":"gitea","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.16.7-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.18","package":"gitea","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.16.7-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.19","package":"gitea","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.16.7-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.20","package":"gitea","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.16.7-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.21","package":"gitea","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.16.7-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.22","package":"gitea","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.16.7-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.23","package":"gitea","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.16.7-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.24","package":"gitea","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.16.7-r0"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"gitea","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.16.7"}]}]},{"source":"osv","ecosystem":"Go","package":"code.gitea.io/gitea","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.16.7"}]}]},{"source":"osv","ecosystem":"Go","package":"code.gitea.io/gitea","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.16.7"}]}]}],"products":[{"vendor":"gitea","product":"gitea"}],"references":[{"url":"https://github.com/go-gitea/gitea/pull/19490","tags":["x_transferred","Patch","Third Party Advisory","advisory","fix","web"]},{"url":"https://github.com/go-gitea/gitea/pull/19487","tags":["x_transferred","Patch","Third Party Advisory","advisory","fix","web"]},{"url":"https://blog.gitea.io/2022/05/gitea-1.16.7-is-released/","tags":["x_transferred","Release Notes","Vendor Advisory","advisory","article"]},{"url":"http://packetstormsecurity.com/files/168400/Gitea-1.16.6-Remote-Code-Execution.html","tags":["x_transferred","Exploit","Third Party Advisory","VDB Entry","advisory","web"]},{"url":"http://packetstormsecurity.com/files/169928/Gitea-Git-Fetch-Remote-Code-Execution.html","tags":["x_transferred","Exploit","Third Party Advisory","VDB Entry","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-30781","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-p5f9-c9j9-g8qx","tags":["advisory"]},{"url":"https://security.alpinelinux.org/vuln/CVE-2022-30781","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/30xxx/CVE-2022-30781.json","tags":["advisory"]},{"url":"https://blog.gitea.io/2022/05/gitea-1.16.7-is-released","tags":["web"]},{"url":"https://github.com/go-gitea/gitea","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2022-30781","description":"Gitea before 1.16.7 does not escape git fetch remote.","status":"published","published":"2022-05-16T00:00:00Z","modified":"2024-08-03T06:56:14.048Z","updated_at":"2026-11-02T14:34:30.842561Z"}],"euvd":[{"id":"EUVD-2022-4684","description":"Gitea before 1.16.7 does not escape git fetch remote.","status":"published","published":"2022-05-16T00:00:00Z","modified":"2024-08-03T06:56:14Z","updated_at":"2026-11-03T03:25:35.869088Z"}],"ghsa":[{"id":"GHSA-p5f9-c9j9-g8qx","title":"Shell command injection in gitea","description":"Gitea before 1.16.7 does not escape the shell out for `git fetch remote` allowing for shell command injection","status":"published","published":"2022-05-17T00:01:46Z","modified":"2023-01-28T05:00:59Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"cwes":["CWE-116"],"updated_at":"2026-11-02T14:36:22.592333Z"}],"nvd":[{"id":"CVE-2022-30781","description":"Gitea before 1.16.7 does not escape git fetch remote.","status":"published","published":"2022-05-16T04:15:13.343Z","modified":"2026-06-17T04:44:17.033Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-116"],"updated_at":"2026-11-02T14:07:20.264424Z"}],"osv":[{"id":"ALPINE-CVE-2022-30781","description":"Gitea before 1.16.7 does not escape git fetch remote.","status":"published","published":"2022-05-16T04:15:13.343Z","modified":"2026-11-03T07:31:15.53212134Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"updated_at":"2026-11-03T07:50:01.054176Z"},{"id":"GHSA-p5f9-c9j9-g8qx","title":"Shell command injection in gitea","description":"Gitea before 1.16.7 does not escape the shell out for `git fetch remote` allowing for shell command injection","status":"published","published":"2022-05-17T00:01:46Z","modified":"2024-08-21T15:26:58.146441Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"cwes":["CWE-116"],"updated_at":"2026-11-02T15:46:52.534897Z"},{"id":"BIT-gitea-2022-30781","description":"Gitea before 1.16.7 does not escape git fetch remote.","status":"published","published":"2024-03-06T10:52:59.101Z","modified":"2026-09-08T08:47:33.632697923Z","updated_at":"2026-11-02T15:28:29.999658Z"},{"id":"CVE-2022-30781","description":"Gitea before 1.16.7 does not escape git fetch remote.","status":"published","published":"2022-05-16T00:00:00Z","modified":"2026-10-28T02:30:26.765245142Z","updated_at":"2026-11-02T15:44:25.516981Z"},{"id":"GO-2022-0450","title":"Shell command injection in gitea in code.gitea.io/gitea","description":"Shell command injection in gitea in code.gitea.io/gitea","status":"published","published":"2024-08-21T15:11:31Z","modified":"2026-03-03T04:50:23.949796Z","updated_at":"2026-11-02T15:47:00.918515Z"}]}}
