{"id":"CVE-2022-1884","published":"2024-11-15T10:53:00Z","modified":"2024-11-15T19:15:02Z","title":"Remote Command Execution in gogs/gogs","vendor":"gogs","product":"gogs/gogs","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":10,"severity":"CRITICAL","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01825,"percentile":0.79338,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"references":[{"url":"https://huntr.com/bounties/9cd4e7b7-0979-4e5e-9a1c-388b58dea76b","tags":[]}],"priority":{"score":22.9,"factors":[{"name":"EPSS percentile","points":15.87},{"name":"CVSS severity","points":7.0}]},"vendorSlug":"gogs","affectedVersions":[{"vendor":"gogs","product":"gogs/gogs","versions":[">= unspecified, <= latest"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2024-11-15T19:13:14.910217Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"gogs.io/gogs","vulnerableRanges":["<0.12.8"],"patched":["0.12.8"],"from":["GHSA-958j-443g-7mm7","GO-2022-0749"],"provenance":"source"}],"summary":{"text":"The gogs/gogs product (versions 0.12.7 and earlier) has a flaw in its file upload handling on Windows servers, where the tree_path parameter is not properly validated. Setting tree_path to .git. lets an attacker write into the .git directory and overwrite .git/config, which can lead to command execution if core.sshCommand is set. The attack needs only network access, with no authentication or user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:39:33Z"},"euvd":{"id":"EUVD-2022-6003","exploited":false,"provenance":"source"}}