Read the docs
TI-2022-01744 Aliases CVE-2022-1884GHSA-958j-443g-7mm7

Remote Command Execution in gogs/gogs

Priority HIGH 82CWE-78Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA and GitHub. Impact type from CWE-78.

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.01841 79th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed gogs.io/gogs (Go): 0.12.8

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
Yes
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
Gogsgogs/gogsup to latest—No fix listedCNA
—gogs.io/gogs (Go)before 0.12.80.12.8Patch availableGHSA-958j-443g-7mm7
  • gogs/gogs VendorGogs Affected up to latest Fixed in — No fix listed CNA
  • gogs.io/gogs (Go) Vendor— Affected before 0.12.8 Fixed in 0.12.8 Patch available GHSA-958j-443g-7mm7

CPE configurations NVD · 2

CPEVersionsRoleVendor
cpe:2.3:a:gogs:gogs:*:*:*:*:*:*:*:*up to 0.12.7VulnerableGogs
cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*not specified by NVDRunning onMicrosoft
  • cpe:2.3:a:gogs:gogs:*:*:*:*:*:*:*:* Versions up to 0.12.7 Vulnerable ·Gogs
  • cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:* Versions not specified by NVD Running on ·Microsoft

Remediation

  • Fix · GHSA-958j-443g-7mm7 gogs.io/gogs (Go) Fixed in 0.12.8 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-1884
  2. 2026-10-03 Alias added: GHSA-958j-443g-7mm7

References

  • TI-2025-07419 File overwrite in file update API in Gogs KEVCVSS 4.0HIGH 8.7
  • TI-2022-01876 OS Command Injection in gogs/gogs CVSS 3.1CRITICAL 9.8
  • TI-2024-36988 Gogs has a Path Traversal in file update API CVSS 4.0HIGH 8.7
  • TI-2025-39562 Gogs's update .git/config file allows remote command execution CVSS 4.0CRITICAL 9.3
  • TI-2026-20951 Gogs: Cross-repository LFS object overwrite via missing content hash verification CVSS 3.1CRITICAL 9.3
  • TI-2024-36263 Gogs has a Path Traversal in file editing UI CVSS 4.0HIGH 8.7
See all 48 →

Sources