Every CVE Search/ Get API key

CVE-2022-1986

OS Command Injection in gogs/gogs

10.0 CriticalFix available

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

4.22%Up 3.2 points since Jun 9, 2022
90%50%10%1%

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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 3.0
10.0 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CVSS 2.0
7.5 HighAV: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 CriticalCVSS: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 CriticalCVSS: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

Affected packages
PackageAffectedFixed
gogs.io/gogs
Go
before 0.12.9
0.12.9

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE 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

MoveEnter Open