CVE-2022-1986 — OS Command Injection in gogs.io/gogs — CVE Details
OS Command Injection in file editor in Gogs
Summary
Advisory Timeline
- First published June 8, 2022 (1586 days ago).
- Last revised August 21, 2024 — 805 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get gogs.io/gogs@v0.12.9
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: go (1).
| Package | Ecosystem | Affected | Fixed In |
|---|---|---|---|
| gogs.io/gogs | go | All versions | 0.12.9 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-78OS Command InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/gogs/gogs/security/advisories/GHSA-67mx-jc2f-jgjmWEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-1986ADVISORY
- https://github.com/gogs/gogs/commit/38aff73251cc46ced96dd608dab6190415032a82WEB
- https://github.com/gogs/gogsPACKAGE
- https://github.com/gogs/gogs/blob/f36eeedbf89328ee70cc3a2e239f6314f9021f58/conf/app.ini#L127-L129WEB
- https://huntr.dev/bounties/776e8f29-ff5e-4501-bb9f-0bd335007930WEB
Frequently Asked Questions
- What is CVE-2022-1986?
- OS Command Injection in file editor in Gogs This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
- How do I check if my project is affected by CVE-2022-1986?
- CVE-2022-1986 affects gogs.io/gogs. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2022-1986 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation is straightforward and causes maximum impact. Patch immediately.
Also Known As
Related CVEs
- CVE-2026-25921CRITICAL
Gogs: Cross-repository LFS object overwrite via missing content hash verification
- CVE-2025-64111CRITICAL
Gogs's update .git/config file allows remote command execution
- CVE-2022-2024CRITICAL
Gogs OS Command Injection vulnerability
- CVE-2026-52805HIGH
Gogs has a Migration Redirect Bypass that Leads to Internal Repository Theft
- CVE-2026-52798HIGH
Gogs has Stored XSS in `.ipynb` Preview
- CVE-2025-8110HIGH
Gogs vulnerable to a bypass of CVE-2024-55947
- CVE-2025-64175HIGH
Gogs Vulnerable to 2FA Bypass via Recovery Code
- CVE-2026-52797HIGH
Gogs: Overwriting critical files results in a denial of service
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies