{"cve":"CVE-2026-52811","nvd":{"published":"2026-06-24T21:16:57.093","modified":"2026-06-26T05:16:30.213","status":"Deferred","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_v4":{"vector":"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","score":9.0},"cvss_v3":null,"cwes":["CWE-22","CWE-59","CWE-61"],"references":["https://github.com/gogs/gogs/commit/04cb8afbb01d855454e59977a1cdbf522ea1db31","https://github.com/gogs/gogs/pull/8332","https://github.com/gogs/gogs/releases/tag/v0.14.3","https://github.com/gogs/gogs/security/advisories/GHSA-89mr-xqfv-758m","https://github.com/gogs/gogs/security/advisories/GHSA-89mr-xqfv-758m"],"products":[],"source":"nvd","synced_at":"2026-10-19T22:41:17.107060303+00:00"},"epss":{"cve":"CVE-2026-52811","score":0.00474,"percentile":0.41007,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-89mr-xqfv-758m","url":"https://osv.dev/vulnerability/GHSA-89mr-xqfv-758m","summary":"Gogs: UploadRepoFiles writes outside repo working tree via committed parent sym","modified":"2026-07-21T13:45:26.580922675Z","packages":[{"ecosystem":"Go","name":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","ranges":["<0.14.3"],"fixed":["0.14.3"]}]},{"id":"GO-2026-5249","url":"https://osv.dev/vulnerability/GO-2026-5249","summary":"Gogs: UploadRepoFiles writes outside repo working tree via committed parent sym in gogs.io/gogs","modified":"2026-06-25T19:45:26.404158651Z","packages":[{"ecosystem":"Go","name":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","ranges":["all versions"],"fixed":[]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}