{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-52811","id":"CVE-2026-52811","title":"Gogs: UploadRepoFiles writes outside repo working tree via committed parent sym","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","descriptionLong":"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","updated":"2026-11-05T02:30:49.769083430Z","reserved":"2026-06-08T18:11:06.659Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"4.0","score":9,"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","rating":"critical","source":"GitHub_M"},"metrics":[{"version":"4.0","score":9,"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","rating":"critical","source":"GitHub_M"},{"version":"4.0","score":9,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","rating":"critical","source":"github.com"},{"version":"4.0","score":null,"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","rating":"unrated","source":"OSV"},{"version":"4.0","score":null,"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","rating":"critical","source":"GitHub"}],"rating":"critical","products":["gogs"],"affectedProducts":[{"vendor":"gogs","product":"gogs","defaultStatus":null,"versions":[{"version":"< 0.14.3","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Go","name":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","ranges":["<0.14.3","all versions"],"fixed":["0.14.3"],"advisory":"GHSA-89mr-xqfv-758m"}],"cwes":["CWE-22","CWE-59","CWE-61"],"aliases":["GHSA-89mr-xqfv-758m","GO-2026-5249"],"references":[{"url":"https://github.com/gogs/gogs/security/advisories/GHSA-89mr-xqfv-758m","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/gogs/gogs/pull/8332","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/gogs/gogs/commit/04cb8afbb01d855454e59977a1cdbf522ea1db31","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/gogs/gogs/releases/tag/v0.14.3","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/52xxx/CVE-2026-52811.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-52811","tags":["advisory"]},{"url":"https://github.com/gogs/gogs","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00474,"epssPercentile":0.41752,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-52811","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-52811","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-52811","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-89mr-xqfv-758m","ok":true,"note":"GHSA-89mr-xqfv-758m"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-52811","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}