CVE-2022-1884: A remote command execution vulnerability exists in gogs/gogs versions <=0.12.7 when deployed on a Windows serv
CVE-2022-1884 is a critical-severity flaw (CVSS 9.8) affecting gogs. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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.
Why this priority
- Critical severity
- Public exploit reference
- CISA SSVC: automatable with total technical impact
- Remotely exploitable, no login, no user action
A fixed release or distro patch exists.
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Exact fixes by distribution
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2022-1884?
gogs: upgrade to newer than 0.12.7. Exact commands for each OS are on this page.
Is CVE-2022-1884 being exploited?
CVE-2022-1884 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2022-1884 affect?
CVE-2022-1884 affects gogs. Severity is critical (CVSS 9.8). 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 `tre
How urgent is CVE-2022-1884?
Priority 67/100. Critical severity; Public exploit reference; CISA SSVC: automatable with total technical impact; Remotely exploitable, no login, no user action
Software pages
Windows vulnerabilities · Windows Server vulnerabilities · Git vulnerabilities
Related CVEs
- CVE-2025-8110 HIGH 8.8 EXPLOITED UPGRADE Gogs Path Traversal Vulnerability
- CVE-2026-26276 HIGH 7.3 UPGRADE Gogs is an open source self-hosted Git service
- CVE-2026-26196 MEDIUM 5.3 UPGRADE Gogs is an open source self-hosted Git service
- CVE-2026-26195 MEDIUM 6.1 UPGRADE Gogs is an open source self-hosted Git service
- CVE-2026-26194 HIGH 7.3 UPGRADE Gogs is an open source self-hosted Git service