# CVE-2024-56731: Gogs deletion of internal files allows remote command execution

- Severity: Critical 10.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/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): 1.27%, higher than 70% of CVEs (2026-12-01)
- Published: 2025-06-24T03:37:42.327Z
- Modified: 2026-06-17T08:12:51.593Z
- Also known as: GHSA-wj44-9vcg-wjq7, GO-2025-3776
- Weaknesses: CWE-552
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: GitHub_M

## Description

Gogs is an open source self-hosted Git service. Prior to version 0.13.3, it's still possible to delete files under the .git directory and achieve remote command execution due to an insufficient patch for CVE-2024-39931. Unprivileged user accounts can execute arbitrary commands on the Gogs instance with the privileges of the account specified by RUN_USER in the configuration. Allowing attackers to access and alter any users' code hosted on the same instance. This issue has been patched in version 0.13.3.

(As written by CVE List.)

## Affected

- gogs gogs: < 0.13.3; before 0.13.3
- gogs.io/gogs (Go): before 0.13.3

## Every score

- GitHub_M: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- GitHub: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/gogs/gogs/security/advisories/GHSA-wj44-9vcg-wjq7> (advisory, patch, vendor-advisory, web)
- <https://github.com/gogs/gogs/commit/77a4a945ae9a87f77e392e9066b560edb71b5de9> (patch, web)
- <https://github.com/gogs/gogs/releases/tag/v0.13.3> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-56731> (advisory)
- <https://github.com/advisories/GHSA-ccqv-43vm-4f3w> (advisory, web)
- <https://github.com/gogs/gogs> (package)

## Sources

- CVE List: [CVE-2024-56731](https://www.cve.org/CVERecord?id=CVE-2024-56731), CVE Terms of Use, modified 2025-06-25
- GitHub Advisory Database: [GHSA-wj44-9vcg-wjq7](https://github.com/advisories/GHSA-wj44-9vcg-wjq7), CC-BY-4.0, modified 2025-07-28
- Go Vulnerability Database: [GO-2025-3776](https://pkg.go.dev/vuln/GO-2025-3776), CC-BY-4.0, modified 2026-03-03
- NVD: [CVE-2024-56731](https://nvd.nist.gov/vuln/detail/CVE-2024-56731), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-56731 · Whole record: https://cve.day/CVE-2024-56731.json · Rebuilt by cve.day 2026-11-25T22:58:52.759Z
