Insufficient Verification of Data Authenticity Affecting gogs.io/gogs/conf package, versions <0.14.2-rc.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.33% (25th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GOGSIOGOGSCONF-15434732
  • published6 Mar 2026
  • disclosed5 Mar 2026
  • creditChenYuan

Introduced: 5 Mar 2026

CVE-2026-25921  (opens in a new tab)
CWE-345  (opens in a new tab)

How to fix?

Upgrade gogs.io/gogs/conf to version 0.14.2-rc.1 or higher.

Overview

Affected versions of this package are vulnerable to Insufficient Verification of Data Authenticity in the handling of LFS object uploads. An attacker can overwrite existing LFS objects across different repositories by uploading objects with the same identifier, potentially leading to unauthorized modification of repository content and enabling supply-chain attacks.

PoC

Overwritable LFS object across different repos leads to supply-chain attack, all LFS objects are vulnerable to be maliciously overwritten by malicious attackers. lfs: verify content hash and prevent object overwrite

Prevent cross-repository LFS object overwrite by using O_CREATE|O_EXCL to atomically refuse writing to an existing file path. If the file already exists (same OID uploaded by another repo), the existing size is returned so the caller can still create the DB record linking the new repo to that OID. Compute SHA-256 of uploaded content during write and reject the upload if the hash does not match the claimed OID, preventing an attacker from writing arbitrary content to a known OID path.

CVSS Base Scores

version 4.0
version 3.1