Vulnerability advisory

GHSA-wv27-2vqp-j7g5

Gogs has the ability to import local repositories via Mirror Settings

Published Updated OSV record ↗

Also known as CVE-2026-52801GO-2026-5724

Severity
  • CVSS 3.xCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

Affected versions

AffectedFixed in
All versions before 0.14.30.14.3

Description

Summary

The Gogs Mirror Settings functionality provide an alternative way from the well protected New Migration functionality for any authenticated users to import local repositories. This issue stems from a lack of validation of SaveAddress function.

Details

Here is the function implementation of the secure New Migration functionality. [image: image]

Here is the function implementation of the Mirror Settings without any validation. [image: image]

PoC

The New Migration feature correctly blocked my attempt to import a local repository. [image: image]

But if I create a normal migration with a valid repository. [image: image]

Then, I could use the Mirror Settings feature under the Repository Settings sync a local repository. [image: image]

Here is the result after the sync. [image: image]

Impact

Users can import local repositories from the server's filesystem, which allows accessing any repository the git user has access to. There is also a potential issue of blind SSRF.

References

  • Codex
  • Claude Code
  • VS Code
  • GitHub Copilot
  • Cursor
  • Cline
  • Windsurf
  • Google Anti-gravity
  • OpenCode
  • Pi
  • Gemini CLI
  • Hermes Agent
  • Zed
  • Junie
  • Qwen Code
  • Kiro
  • Kilo Code
  • Factory Droid

Set up GitHits for your agents

Run this command:

<> bash
npx githits@latest init

What happens next:

  1. Opens your browser to authorize GitHits
  2. Asks whether to set up GitHits at the user or project level
  3. Detects your supported AI coding tools
  4. Lets you choose which tools to configure
  5. Configures the selected tools