# CVE-2026-70402: Gitea local code execution through writable Git hooks

- Severity: Medium 5.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L`
- 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.12%, higher than 1% of CVEs (2026-11-30)
- Published: 2026-10-14T14:36:46.774Z
- Modified: 2026-10-14T16:17:51.930Z
- Weaknesses: CWE-732
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Gitea

## Description

Gitea creates server-side Git hook directories and scripts with mode 0777 and relies on the process umask to restrict access. With a permissive umask such as 0000 or 0002, another local user who can reach the repository storage may modify a hook or add an executable to a writable hook directory. A later Git operation can execute that file as the Gitea service account.

(As written by CVE List.)

## Affected

- code.gitea.io/gitea: up to 1.27.2

## References

- <https://github.com/go-gitea/gitea/security/advisories/GHSA-pq8x-xpgp-rvmh> (vendor-advisory)
- <https://blog.gitea.com/release-of-1.27.3/> (release-notes)
- <https://github.com/go-gitea/gitea/pull/39008> (patch)
- <https://github.com/go-gitea/gitea/pull/39016> (patch)
- <https://github.com/go-gitea/gitea/releases/tag/v1.27.3> (release-notes)

## Sources

- CVE List: [CVE-2026-70402](https://www.cve.org/CVERecord?id=CVE-2026-70402), CVE Terms of Use, modified 2026-10-14
- NVD: [CVE-2026-70402](https://nvd.nist.gov/vuln/detail/CVE-2026-70402), Public domain, modified 2026-10-14

---

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