{"id":"CVE-2026-52811","aliases":["GHSA-89mr-xqfv-758m","GO-2026-5249"],"url":"https://o3.security/vulnerability/CVE-2026-52811","summary":"Gogs: UploadRepoFiles writes outside repo working tree via committed parent sym","details":"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.","published":"2026-06-24T20:31:38.233Z","modified":"2026-08-12T03:51:20.303755862Z","cvss":null,"epss":{"score":0.00474,"percentile":0.39656,"asOf":"2026-09-12"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"gogs.io/gogs","fixedVersion":"0.14.3"}],"fix":{"url":"https://github.com/gogs/gogs/commit/04cb8afbb01d855454e59977a1cdbf522ea1db31","label":"gogs/gogs@04cb8af"},"references":[{"type":"WEB","url":"https://github.com/gogs/gogs/releases/tag/v0.14.3"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/52xxx/CVE-2026-52811.json"},{"type":"ADVISORY","url":"https://github.com/gogs/gogs/security/advisories/GHSA-89mr-xqfv-758m"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-52811"},{"type":"FIX","url":"https://github.com/gogs/gogs/commit/04cb8afbb01d855454e59977a1cdbf522ea1db31"},{"type":"FIX","url":"https://github.com/gogs/gogs/pull/8332"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:20.303755862Z"}}