9

CVE-2026-52811: Gogs: UploadRepoFiles writes outside repo working tree via committed parent sym

Deferred
AliasesGHSA-89mr-xqfv-758mGO-2026-5249
Published 24-06-2026Last modified 26-06-2026

Vulnerability summary

CVE-2026-52811 is a critical (CVSS 9.0) vulnerability in gogs. EPSS estimates a 0.47% chance of exploitation in the next 30 days, higher than 41% of scored vulnerabilities.

Priority
Prioritisesevere

Severe, CVSS 9 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 0% (FIRST, 03-11-2026)

Source freshness unavailable

How is this decided?
CVSS score
9.0/10
010
Critical · v4.0 (CVE.org)
EPSS score
0.47%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 1 · Related 1

Timeline

  1. 24-06-2026
    PublishedVulnerability first disclosed.
  2. 26-06-2026
    Last modifiedVulnerability information updated.

Description

Gogs is an open source self-hosted Git service. Prior to 0.14.3, (*Repository).UploadRepoFiles checks for symlinks only on the leaf of the upload target (osx.IsSymlink(targetPath)). The siblings UpdateRepoFile, DeleteRepoFile, and GetDiffPreview use hasSymlinkInPath, which lstats every component — UploadRepoFiles is the lone outlier. An attacker with repo-write access plus a multipart upload whose filename contains a literal backslash (preserved by filepath.Base on Linux, then converted to / by pathx.Clean) redirects the write through a previously-committed directory symlink. iox.CopyFile opens the destination with os.Create (no O_NOFOLLOW), so the kernel follows the parent symlink and writes attacker bytes anywhere the gogs UID can write — ~git/.ssh/authorized_keys → SSH foothold, or <repo>.git/hooks/post-receive → next-push RCE. This vulnerability is fixed in 0.14.3.

CVSS metrics

3 scores · 3 sources · 1 version

EPSS trend

Probability

0.47%

Chance of exploitation in the next 30 days

Percentile

41%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.47% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.

Gogs1 product
Gogs.io1 product
  • gogs< 0.14.3 | All versions (No fix recorded)

2 vendors · 2 products

References

6 links