Skip to main content
← All vulnerabilities
CVE-2022-1884GO-2022-0749GHSA-958J-443G-7MM7

Remote Command Execution in gogs/gogs

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 0.12.8
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: total

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: total

  3. Record last updated

Affected versions

  • gogs gogs/gogs

    Version range not reported

  • gogs.io/gogsGo

    fixed in 0.12.8

References 1

huntr.com