CVE-2022-1986
OS Command Injection in gogs/gogs
OS Command Injection in GitHub repository gogs/gogs prior to 0.12.9.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
10.0
OS Command Injection in gogs/gogs
OS Command Injection in GitHub repository gogs/gogs prior to 0.12.9.
- Record
CVE-2022-1986- CVSS 3.0
- 10.0 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
EUVDEUVD-2022-5955
10.0
OS Command Injection in GitHub repository gogs/gogs prior to 0.12.9.
- Record
EUVD-2022-5955- CVSS 3.0
- 10.0 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-67mx-jc2f-jgjm
9.8
OS Command Injection in file editor in Gogs
Impact
The malicious user is able to update a crafted config file into repository's .git directory in combination with crafted file deletion to gain SSH access to the server. All installations with repository upload enabled (default) are affected.
Patches
File deletions are prohibited to repository's .git directory. Users should upgrade to 0.12.9 or the latest 0.13.0+dev.
Workarounds
N/A
References
https://huntr.dev/bounties/776e8f29-ff5e-4501-bb9f-0bd335007930/
For more information
If you have any questions or comments about this advisory, please post on #7000.
- Record
GHSA-67mx-jc2f-jgjm- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
NVD
9.8
OS Command Injection in GitHub repository gogs/gogs prior to 0.12.9.
- Record
CVE-2022-1986- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 3.0
- 10.0 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-78
- Updated
- 2026-11-02
OSV
10.0
OS Command Injection in gogs/gogs
OS Command Injection in GitHub repository gogs/gogs prior to 0.12.9.
- Record
CVE-2022-1986- CVSS 3.0
- 10.0 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVGHSA-67mx-jc2f-jgjm
9.8
OS Command Injection in file editor in Gogs
Impact
The malicious user is able to update a crafted config file into repository's .git directory in combination with crafted file deletion to gain SSH access to the server. All installations with repository upload enabled (default) are affected.
Patches
File deletions are prohibited to repository's .git directory. Users should upgrade to 0.12.9 or the latest 0.13.0+dev.
Workarounds
N/A
References
https://huntr.dev/bounties/776e8f29-ff5e-4501-bb9f-0bd335007930/
For more information
If you have any questions or comments about this advisory, please post on #7000.
- Record
GHSA-67mx-jc2f-jgjm- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVGO-2022-0556 No score
OS Command Injection in file editor in Gogs in gogs.io/gogs
OS Command Injection in file editor in Gogs in gogs.io/gogs
- Record
GO-2022-0556- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
gogs.io/gogsGo |
before 0.12.9 | 0.12.9 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-1986 is a critical vulnerability (CVSS 10.0) in Gogs, published June 8, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 4.22%, the 91st percentile. Fixed in gogs.io/gogs 0.12.9.
References
huntr.dev/bounties/776e8f29-ff5e-4501-bb9f-0bd335007930
github.com/gogs/gogs/commit/38aff73251cc46ced96dd608dab6190415032a82
github.com/gogs/gogs/security/advisories/GHSA-67mx-jc2f-jgjm
github.com/gogs/gogs/blob/f36eeedbf89328ee70cc3a2e239f6314f9021f58/conf/app.ini
nvd.nist.gov/vuln/detail/CVE-2022-1986
github.com/advisories/GHSA-67mx-jc2f-jgjm
github.com/CVEProject/cvelistV5/tree/main/cves/2022/1xxx/CVE-2022-1986.json
github.com/gogs/gogs