Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

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

Quick assessment

Affected
gogs gogs
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Gogs是Gogs团队开源的一个源代码管理软件。 Gogs 0.14.3之前版本存在安全漏洞,该漏洞源于UploadRepoFiles函数仅检查上传目标的叶子节点是否为符号链接,而其他相关函数则使用hasSymlinkInPath进行递归检查,可能导致具有仓库写入权限的攻击者通过包含反斜杠的文件名将写入重定向通过先前提交的目录符号链接,从而写入任意位置。

AI Predicted 8.6 Difficulty: Moderate EPSS 0.47% · P39

Affected Version Matrix 1

VendorProduct Version RangeStatus
gogs gogs < 0.14.3 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-52811

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Gogs: UploadRepoFiles writes outside repo working tree via committed parent sym
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Source: CVE Program / CVE List V5
Vulnerability Type
对路径名的限制不恰当(路径遍历)
Source: CVE Program / CVE List V5
Vulnerability Title
Gogs 路径遍历漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Gogs是Gogs团队开源的一个源代码管理软件。 Gogs 0.14.3之前版本存在安全漏洞,该漏洞源于UploadRepoFiles函数仅检查上传目标的叶子节点是否为符号链接,而其他相关函数则使用hasSymlinkInPath进行递归检查,可能导致具有仓库写入权限的攻击者通过包含反斜杠的文件名将写入重定向通过先前提交的目录符号链接,从而写入任意位置。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
gogs gogs < 0.14.3 -

II. Public POCs for CVE-2026-52811

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-52811

请登录查看更多情报信息。

Patches & Fixes for CVE-2026-52811 (2)

Vendor Advisories for CVE-2026-52811 (1)

Vendor Pages for CVE-2026-52811 (1)

Same Patch Batch · gogs · 2026-06-24 · 24 CVEs total

CVE-2026-52813 10.0 CRITICAL Gogs: Path Traversal in organization name results in RCE through Git hooks
CVE-2026-52806 9.9 CRITICAL Gogs: RCE via git rebase --exec argument injection in pull request merge
CVE-2026-52798 8.9 HIGH Gogs: Stored XSS in `.ipynb` Preview
CVE-2026-52800 8.8 HIGH Gogs: CSRF Leading to Organization Owner Takeover
CVE-2026-52805 8.7 HIGH Gogs: Migration Redirect Bypass Leads to Internal Repository Theft
CVE-2026-52797 8.5 HIGH Gogs: Overwriting critical files results in a denial of service
CVE-2026-47267 8.3 HIGH Gogs: SSRF in webhook deliveries
CVE-2026-52801 8.1 HIGH Gogs: Ability to import local repositories via Mirror Settings
CVE-2026-52799 7.5 HIGH Gogs: Missing Authorization in Attachment Download
CVE-2026-52808 7.1 HIGH Gogs: Write-level collaborators can mutate admin-only repository settings via API
CVE-2026-52809 6.8 MEDIUM Gogs: Password-reset tokens use account-activation lifetime, ignoring RESET_PASSWORD_CODE_
CVE-2026-52802 5.4 MEDIUM Gogs: Open Redirect via redirect_to in Gogs
CVE-2025-64719 4.9 MEDIUM Gogs: Denial of Service in repository/wiki file listing web pages
CVE-2026-52795 4.3 MEDIUM Gogs: Authorization Bypass in Watch API allows any user to monitor private repository acti
CVE-2026-52796 3.5 LOW Gogs: DoS in rendering issue index pattern
CVE-2026-52810 Gogs: Write to readonly repositories using receive-pack + service=git-upload-pack confusio
CVE-2026-52814 Gogs: Unauthenticated Asymmetric Denial of Service (DoS) via SSH Handshake Stall (File Des
CVE-2026-52807 Gogs: DOM-based XSS via Milestone Name on New Issue Page
CVE-2026-52812 Gogs: LFS dedupe path leaks private repo content across tenants
CVE-2026-52804 Gogs: Privilege Escalation via Collaboration Access Mode Validation

Showing top 20 of 24 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2026-52811

No comments yet


Leave a comment