{"answers":{"affected":"3 open source packages ship an affected version, including gogs.io/gogs.","exploited":"There is no known exploitation of CVE-2026-52811 in the wild and no public exploit code.","fix":"Upgrade gogs.io/gogs to 0.14.3 or later.","what":"CVE-2026-52811 is a critical path traversal vulnerability in gogs, published on 24 Jun 2026. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-52811 and fix it if it is affected.\n\nWhat it is: CVE-2026-52811 is a critical path traversal vulnerability in gogs, published on 24 Jun 2026. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-52811 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- gogs.io/gogs (Go): affected all versions; no fix listed\n- gogs.io/gogs (Go): affected all versions; fixed in 0.14.3\n- gogs.io/gogs (Go): affected all versions; fixed in 0.14.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-52811/ (Markdown: https://insights.sbomify.com/CVE-2026-52811/index.md)","id":"CVE-2026-52811","markdown":"https://insights.sbomify.com/CVE-2026-52811/index.md","name":"CVE-2026-52811","record":{"aliases":["GHSA-89mr-xqfv-758m","GO-2026-5249"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"Self-hosted Git service","requires_auth":"low_privilege","summary":"An attacker with repo-write access can exploit symlink handling flaws to write files outside the repository, potentially achieving remote code execution or SSH access.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":9,"severity":"critical","source":"cna","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","version":"4.0"},"cwes":[{"id":"CWE-61","name":"UNIX Symbolic Link (Symlink) Following"},{"id":"CWE-59","name":"Improper Link Resolution Before File Access"},{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"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 \u003crepo\u003e.git/hooks/post-receive → next-push RCE. This vulnerability is fixed in 0.14.3.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Gogs: UploadRepoFiles writes outside repo working tree via committed parent sym","id":"CVE-2026-52811","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":3,"n_references":4,"next":{"headline":"Gogs: LFS dedupe path leaks private repo content across tenants","id":"CVE-2026-52812"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"GO-2026-5249"},{"ecosystem":"Go","fixed":["0.14.3"],"introduced":["0"],"last_affected":[],"package":"gogs.io/gogs","purl":null,"source":"GHSA-89mr-xqfv-758m"},{"ecosystem":"Go","fixed":["0.14.3"],"introduced":["0"],"last_affected":[],"package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"GHSA-89mr-xqfv-758m"}],"prev":{"headline":"Gogs: Write to readonly repositories using receive-pack + service=git-upload-pack confusion","id":"CVE-2026-52810"},"products":["gogs"],"published":"2026-06-24","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-06-26","vendors":["gogs"]},"summary":"An attacker with repo-write access can exploit symlink handling flaws to write files outside the repository, potentially achieving remote code execution or SSH access.","url":"https://insights.sbomify.com/CVE-2026-52811/"}