CVE-2022-1986 OS Command Injection in gogs/gogs
Attackers can execute arbitrary OS commands on the server hosting Gogs, requiring an upgrade to the latest version.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-1986?
CVE-2022-1986 is a critical command injection vulnerability in gogs/gogs, published on 9 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
OS Command Injection in GitHub repository gogs/gogs prior to 0.12.9.
Weakness: CWE-78
Which versions are affected by CVE-2022-1986?
3 open source packages ship an affected version, including gogs.io/gogs. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
gogs.io/gogs Go | All versions | 0.12.9 |
gogs.io/gogs Go | All versions | 0.12.9 |
gogs.io/gogs Go | All versions | 0.12.9 |
Products include Gogs Gogs.
How do I fix CVE-2022-1986?
Upgrade gogs.io/gogs to 0.12.9 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2022-1986 being exploited?
There is no known exploitation of CVE-2022-1986 in the wild and no public exploit code.
Other vulnerabilities in gogs/gogs
Sources
Also known as GHSA-67mx-jc2f-jgjm, GO-2022-0556.