# CVE-2026-52797: Gogs: Overwriting critical files results in a denial of service

- Severity: High 8.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.44%, higher than 40% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-16T23:40:04.000Z
- Modified: 2026-07-21T13:30:31.799Z
- Also known as: GHSA-pm6v-2h4w-4rp2, GO-2026-5545
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Gogs is an open source self-hosted Git service. Prior to 0.14.0, as an authorized user, an intruder can dictate the value which is passed to the git diff command which, together with bypassing the filtering of the passed value, allows the user to bypass the target directory and write the result of the comparison to any arbitrary path. This vulnerability is fixed in 0.14.0.

(As written by CVE List.)

## Affected

- gogs gogs: < 0.14.0
- gogs.io/gogs (Go): before 0.14.0; all versions

## Every score

- GitHub_M: CVSS:3.1 8.5 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H`
- GitHub: CVSS:3.1 8.5 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H`

## References

- <https://github.com/gogs/gogs/security/advisories/GHSA-pm6v-2h4w-4rp2> (exploit, advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-52797> (advisory)
- <https://github.com/gogs/gogs> (package)

## Sources

- CVE List: [CVE-2026-52797](https://www.cve.org/CVERecord?id=CVE-2026-52797), CVE Terms of Use, modified 2026-06-25
- GitHub Advisory Database: [GHSA-pm6v-2h4w-4rp2](https://github.com/advisories/GHSA-pm6v-2h4w-4rp2), CC-BY-4.0, modified 2026-07-21
- Go Vulnerability Database: [GO-2026-5545](https://pkg.go.dev/vuln/GO-2026-5545), CC-BY-4.0, modified 2026-06-25
- NVD: [CVE-2026-52797](https://nvd.nist.gov/vuln/detail/CVE-2026-52797), Public domain, modified 2026-06-25

---

Page: https://cve.day/CVE-2026-52797 · Whole record: https://cve.day/CVE-2026-52797.json · Rebuilt by cve.day 2026-11-25T22:59:25.741Z
