Vulnerability advisory

GHSA-3qq3-668m-v9mj

Gogs has a Denial of Service in repository/wiki file listing web pages

Published Updated OSV record ↗

Also known as CVE-2025-64719GO-2026-5098

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

Affected versions

AffectedFixed in
All versions before 0.14.30.14.3

Description

Summary

A malicious user with rights to create a new file on a repository or wiki page can trigger a denial of service condition in which the pages containing the listing of files will return HTTP error 500 and render the web interface unusable for the repository or wiki.

Details

The issue is present in file internal/route/repo/wiki.go and internal/route/repo/view.go where the pages try to recover commit information. If errors are returned while recovering commit information, the page will return a 500 error and stop rendering, resulting in a denial of service. In view.go the issue occurs at line 56 while a slightly different issue occurs in wiki.go at line 174 where commits[0] is dereferenced without checking if it contains value. It is possible to trigger issues in assigning the correct value to variable commits by using a specific string as part of the page title. The issue is linked to the fact that file names can contain special characters such as *, ?, [, ], etc. that will be interpreted as git's pathspec instead of a simple string. So crafting a name containing an incomplete pathspec sequence will trigger this error.

PoC

As a proof of concept consider the file name "[] and how it affects repository and wiki pages. In the following images it is shown how pages are created, the error shown in the web page right after creation and the error as logged in the console.

[image: repo_creation]

Figure 1: Creation of malicious file in repository

[image: repo_error_web]

Figure 2: Malicious file in repository causes error 500

[image: repo_error_console]

Figure 3: Console error caused by malicious file in repository

[image: wiki_creation]

Figure 4: Creation of malicious file in wiki

[image: wiki_error_web]

Figure 5: Malicious file in wiki causes error 500

[image: wiki_error_console]

Figure 6: Console error caused by malicious file in wiki

Impact

The repository and wiki pages will not render when files named with the payload are present in the repository or in the wiki. This condition will be present as long as the malicious file is present in the repository or wiki. The issue will not cause a DoS condition when using the server via CLI.

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