All vulnerabilities

Servers and applications

CVE-2026-25921

Cross-repository LFS object overwrite via missing content hash verification

Severity
Critical 9.3
Published
5 Mar 2026
Last changed
17 Jun 2026
Added to UpHeron
1 Nov 2026
Fixed in
0.14.2
Exploit chance
0.4% in the next 30 daysHigher than 31% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Insufficient verification of data authenticity (CWE-345)
Attack
Over the network · No login needed · No user action needed
Attacker can
Change data · Slow it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:L
Also known as
GHSA-cj4v-437j-jq4c
Sources
NVD, Project advisories (GitHub)

Description

Overwritable LFS object across different repos leads to supply-chain attack, all LFS objects are vulnerable to be maliciously overwritten by malicious attackers.

Gogs store all LFS objects in the same place, no isolation between different repositories. (repo id not concatenated to storage path) https://github.com/gogs/gogs/blob/7a2dffa95ac64f31c8322cb50d32694b05610144/internal/lfsutil/storage.go#L52-L58

Gogs does not verify uploaded LFS file content against its claimed SHA-256, meaning attackers can manipulate the uploaded file like injecting backdoor. https://github.com/gogs/gogs/blob/7a2dffa95ac64f31c8322cb50d32694b05610144/internal/lfsutil/storage.go#L79-L89

Here's the comment that trust client to retry upload allowing them to overwrite. However, this assumption does not hold in the case of a malicious client. https://github.com/gogs/gogs/blob/7a2dffa95ac64f31c8322cb50d32694b05610144/internal/route/lfs/basic.go#L111-L113

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

Affected software

SoftwareAffected versions
GogsServers and applications · cpe:a:gogs:gogs
  • Every version before 0.14.2
GogsServers and applications · github:gogs/gogs
  • Every version up to 0.14.1

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

  • NVD https://nvd.nist.gov/vuln/detail/CVE-2026-25921
  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-25921
  • GitHub Advisory Database https://github.com/advisories/GHSA-cj4v-437j-jq4c
  • github.com https://github.com/gogs/gogs/security/advisories/GHSA-cj4v-437j-jq4c