{"cve":"CVE-2022-1884","nvd":{"published":"2024-11-15T11:15:07.803","modified":"2026-06-17T04:23:16.700","status":"Analyzed","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8},"cwes":["CWE-77","CWE-78"],"references":["https://huntr.com/bounties/9cd4e7b7-0979-4e5e-9a1c-388b58dea76b"],"products":["gogs:gogs"],"source":"nvd","synced_at":"2026-10-19T21:57:07.693694550+00:00"},"epss":{"cve":"CVE-2022-1884","score":0.01841,"percentile":0.78992,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-958j-443g-7mm7","url":"https://osv.dev/vulnerability/GHSA-958j-443g-7mm7","summary":"OS Command Injection in gogs","modified":"2024-11-15T18:01:29Z","packages":[{"ecosystem":"Go","name":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","ranges":["<0.12.8"],"fixed":["0.12.8"]}]},{"id":"GO-2022-0749","url":"https://osv.dev/vulnerability/GO-2022-0749","summary":"OS Command Injection in gogs in gogs.io/gogs","modified":"2026-03-03T04:50:50.536056Z","packages":[{"ecosystem":"Go","name":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","ranges":["<0.12.8"],"fixed":["0.12.8"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}