CVE-2022-1884
CRITICALgogs/gogs <=0.12.7 - Remote Command Execution via tree_path Parameter
Title source: llmDescription
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.
References (1)
Core 1
Core References
Exploit, Third Party Advisory
https://huntr.com/bounties/9cd4e7b7-0979-4e5e-9a1c-388b58dea76b
Scores
CVSS v3
9.8
EPSS
0.0177
EPSS Percentile
75.4%
Attack Vector
NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CISA SSVC
Vulnrichment
Exploitation
poc
Automatable
yes
Technical Impact
total
Details
CWE
CWE-77
CWE-78
Status
published
Products (2)
gogs/gogs
< 0.12.7
gogs.io/gogs
0 - 0.12.8Go
Published
Nov 15, 2024
Tracked Since
Feb 18, 2026