{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-1884","id":"CVE-2022-1884","title":"Remote Command Execution in gogs/gogs","description":"A remote command execution vulnerability exists in gogs/gogs versions <=0.12.7 when deployed on a Windows server. The vulnerability arises due to improper validation of the `tree_path` parameter during file uploads. An attacker can set `tree_path=.git.` to upload a file into the .git directory, allowing them to write or rewrite the `.git/config` file. If the `core.sshCommand` is set, this can lead","descriptionLong":"A remote command execution vulnerability exists in gogs/gogs versions <=0.12.7 when deployed on a Windows server. The vulnerability arises due to improper validation of the `tree_path` parameter during file uploads. An attacker can set `tree_path=.git.` to upload a file into the .git directory, allowing them to write or rewrite the `.git/config` file. If the `core.sshCommand` is set, this can lead to remote command execution.","published":"2024-11-15T10:53:00.844Z","updated":"2026-10-28T02:30:47.798545800Z","reserved":"2022-05-25T12:20:16.450Z","status":"Analyzed","rejected":false,"assigner":"@huntr_ai","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},"metrics":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"CISA-ADP"},{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"OSV"},{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"@huntr_ai"},{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"huntr.dev"},{"version":"3.0","score":10,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"GitHub"}],"rating":"critical","products":["gogs/gogs"],"affectedProducts":[{"vendor":"gogs","product":"gogs/gogs","defaultStatus":null,"versions":[{"version":"unspecified","status":"affected","versionType":"custom","lessThanOrEqual":"latest"}],"platforms":[]}],"packages":[{"ecosystem":"Go","name":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","ranges":["<0.12.8"],"fixed":["0.12.8"],"advisory":"GHSA-958j-443g-7mm7"}],"cwes":["CWE-78","CWE-77"],"aliases":["GHSA-958j-443g-7mm7","GO-2022-0749"],"references":[{"url":"https://huntr.com/bounties/9cd4e7b7-0979-4e5e-9a1c-388b58dea76b","tags":["Exploit","Third Party Advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/1xxx/CVE-2022-1884.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-1884","tags":["advisory"]},{"url":"https://github.com/gogs/gogs/security/advisories/GHSA-958j-443g-7mm7","tags":["web","advisory"]},{"url":"https://github.com/gogs/gogs/issues/6968","tags":["web"]},{"url":"https://github.com/gogs/gogs/pull/6970","tags":["web"]},{"url":"https://github.com/gogs/gogs","tags":["package"]},{"url":"https://github.com/gogs/gogs/blob/f36eeedbf89328ee70cc3a2e239f6314f9021f58/conf/app.ini#L127-L129","tags":["web"]},{"url":"https://github.com/gogs/gogs/releases/tag/v0.12.8","tags":["web"]},{"url":"https://www.huntr.dev/bounties/9cd4e7b7-0979-4e5e-9a1c-388b58dea76b","tags":["web"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total"},"epss":0.01825,"epssPercentile":0.79242,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-1884","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-1884","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-1884","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-958j-443g-7mm7","ok":true,"note":"GHSA-958j-443g-7mm7"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-1884","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}