CVE-2022-1884 json
Remote Command Execution in gogs/gogs
published 4y ago modified 4mo ago also GHSA-958j-443g-7mm7 , GO-2022-0749 , EUVD-2022-6003
- cvss
- 10.0
- version 3.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.8%
- EPSS 1.8% chance of exploitation in 30 days, percentile 79%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- go gogs.io/gogs 0.12.8
- github.com/gogs/gogs#6970 pull request
- github.com/gogs/gogs/releases/tag/v0.12.8 release
Is CVE-2022-1884 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- total
- Assessed
- last yr.
Exploit prediction
1.84% chance of exploitation in the next 30 days, higher than 79% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- huntr.com https://huntr.com/bounties/9cd4e7b7-0979-4e5e-9a1c-388b58dea76b referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.0 | 10.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| CISA ADP | 3.1 | 10.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| CNA | 3.1 | 10.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| GitHub | 3.0 | 10.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | gogs.io/gogs | <0.12.8 |
0.12.8 |
Affected products
- gogs gogs/gogs
- gogs gogs
Classification
References
-
github.com
/gogs/gogs/pull/6970
web
-
huntr.com
/bounties/9cd4e7b7-0979-4e5e-9a1c-388b58dea76b
web, exploit, third-party-advisory
-
github.com
/gogs/gogs/security/advisories/GHSA-958j-443g-7mm7
web, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-1884
advisory
-
github.com
/gogs/gogs/issues/6968
web
-
github.com
/gogs/gogs
package
-
github.com
/gogs/gogs/blob/f36eeedbf89328ee70cc3a2e239f6314f9021f58/conf/app.ini#L127-L129
web
-
github.com
/gogs/gogs/releases/tag/v0.12.8
web
-
huntr.dev
/bounties/9cd4e7b7-0979-4e5e-9a1c-388b58dea76b
web
Sources
- CVE List CVE-2022-1884
- GitHub Advisory GHSA-958j-443g-7mm7
- NVD CVE-2022-1884
- OSV GO-2022-0749
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.