CVE-2022-1884
published critical CVSS 3.0 · 10.0Remote Command Execution in gogs/gogs
Package status and fixes
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.0
- Base score
- 10.0 / 10
- Severity
- critical
- Provider
- @huntr_ai · cna
- Vector string
- CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 10.0 | critical | CISA-ADP · adp | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| gogs | gogs/gogs | unspecified through latest (affected · custom) | @huntr_ai · cna |
| gogs | gogs | 0 through 0.12.7 (affected · custom)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-78 CWE-78 Improper Neutralization of Special Elements used in an OS Command
References
1Provider assertions
2@huntr_ai · cna
Remote Command Execution in gogs/gogs
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- d81f3fb26f429651ea3c315aebc23cfa6331bcd39b0656795605f5013239a3bd
- Ingested
- 23 Sep 2026, 07:57:48 UTC
- Source record
- Official CVE record