{"id":"CVE-2022-1884","state":"PUBLISHED","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 to remote command execution.","publishedAt":"2024-11-15T10:53:00.844Z","updatedAt":"2024-11-15T19:15:02.353Z","severity":{"score":10,"label":"Critical","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","source":"@huntr_ai"},"assigner":"@huntr_ai","products":["gogs gogs/gogs"],"affected":[{"vendor":"gogs","product":"gogs/gogs","versions":[{"version":"unspecified","status":"affected","lessThanOrEqual":"latest","versionType":"custom"}]}],"references":["https://huntr.com/bounties/9cd4e7b7-0979-4e5e-9a1c-388b58dea76b"],"weaknesses":["CWE-78"],"ingestedAt":"2026-10-29T19:49:29.138Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/1xxx/CVE-2022-1884.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2022-1884","state":"PUBLISHED","datePublished":"2024-11-15T10:53:00.844Z","dateUpdated":"2024-11-15T19:15:02.353Z","assignerShortName":"@huntr_ai","assignerOrgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateReserved":"2022-05-25T12:20:16.450Z"},"containers":{"cna":{"title":"Remote Command Execution in gogs/gogs","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"gogs","product":"gogs/gogs","versions":[{"version":"unspecified","status":"affected","lessThanOrEqual":"latest","versionType":"custom"}]}],"references":[{"url":"https://huntr.com/bounties/9cd4e7b7-0979-4e5e-9a1c-388b58dea76b"}],"metrics":[{"cvssV3_0":{"version":"3.0","attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"CHANGED","userInteraction":"NONE","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","baseScore":10,"baseSeverity":"CRITICAL"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-78","type":"CWE","lang":"en","description":"CWE-78 Improper Neutralization of Special Elements used in an OS Command"}]}],"providerMetadata":{"shortName":"@huntr_ai","orgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateUpdated":"2024-11-15T10:53:00.844Z"},"source":{"advisory":"9cd4e7b7-0979-4e5e-9a1c-388b58dea76b","discovery":"EXTERNAL"}},"adp":[{"title":"CISA ADP Vulnrichment","affected":[{"vendor":"gogs","product":"gogs","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThanOrEqual":"0.12.7","versionType":"custom"}],"cpes":["cpe:2.3:a:gogs:gogs:*:*:*:*:*:*:*:*"]}],"metrics":[{"cvssV3_1":{"scope":"CHANGED","version":"3.1","baseScore":10,"attackVector":"NETWORK","baseSeverity":"CRITICAL","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"NONE","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-11-15T19:13:14.910217Z","id":"CVE-2022-1884","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-11-15T19:15:02.353Z"}}]}}}