All vulnerabilities

Servers and applications

GHSA-fv2v-vwmj-j74p

Gogs repository AutoInit template path traversal allows arbitrary file read on Windows

Severity
Medium 6.5
Published
24 Nov 2026
Last changed
24 Nov 2026
Added to UpHeron
24 Nov 2026
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Read data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Sources
Project advisories (GitHub)

Description

An authenticated user who is allowed to create repositories can trigger this issue on a Windows deployment through the web form (POST /repo/create) or the API (POST /api/v1/user/repos), using the ordinary AutoInit option. The template name supplied at creation time is used as a filesystem path without an allowlist check, so a file outside the intended custom/conf template directory, including custom/conf/app.ini, is read and committed into the user's own new repository where it can be read back in full. This was checked on the latest commit of the project.

The readme, license, and gitignores fields of the create-repository request are plain strings with no binding validation and no allowlist. Only the repository name is validated (internal/form/repo.go:23-33 and internal/route/api/v1/repo_repo.go:160-168).

From gogs/gogs's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
GogsServers and applications · github:gogs/gogs
  • Every version up to 0.14.3

About Gogs

free forge based on Git written in Go

From Wikidata, CC0 1.0.
Docker Hub pulls
94,097,312Docker Hub, 22 Nov 2026
GitHub stars
47,981GitHub, 22 Nov 2026
Forks
5,081GitHub, 22 Nov 2026
Latest release
v0.14.4GitHub, 22 Nov 2026
Released
12 Nov 2026GitHub
Developer
FLOSS contributorWikidata
License
Expat licenseWikidata
Written in
Go, Cascading Style Sheets, JavaScriptWikidata
First released
11 Feb 2014Wikidata
First published on GitHub
12 Feb 2014GitHub

References