All vulnerabilities

Servers and applications

GHSA-p27c-f9fr-4jmw

Remote process crash in Gogs diff rendering via a quoted rename path

Severity
High 7.5
Published
16 Nov 2026
Last changed
16 Nov 2026
Added to UpHeron
16 Nov 2026
Fixed in
0.15.0
Weakness
Uncaught exception (CWE-248)CWE-1285
Attack
Over the network · No login needed · No user action needed
Attacker can
Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Sources
Project advisories (GitHub)

Description

Gogs builds compare and pull request diffs by running git diff and passing the output to the diff parser in github.com/gogs/git-module v1.8.9. For a rename where the old path is unquoted and the new path is C-quoted, Git produces a header such as:

The parser assumes an unquoted header contains the byte sequence b/. This header contains "b/ instead. strings.Index returns -1 and the next slice operation panics with slice bounds out of range [:-1].

Repository.Diff runs the parser in a goroutine started with go StreamParseDiff and does not recover the panic. The panic therefore terminates the entire Gogs process. The HTTP server's handler recovery does not cover this child goroutine.

A user who can create a repository, push a commit, or fork a public repository and open a compare or pull request page can produce the commit and load the page. A public repository compare page can also be viewed without signing in.

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

Affected software

SoftwareAffected versions
GogsServers and applications · github:gogs/gogs
  • Every version before 0.15.0

About Gogs

free forge based on Git written in Go

From Wikidata, CC0 1.0.
Docker Hub pulls
94,040,857Docker Hub, 15 Nov 2026
GitHub stars
47,939GitHub, 15 Nov 2026
Forks
5,082GitHub, 15 Nov 2026
Latest release
v0.14.4GitHub, 15 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