CVE-2026-70402 Gitea local code execution through writable Git hooks
Local attackers can execute arbitrary code as the Gitea service account if the system umask is permissive, allowing modification of writable Git hooks.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-70402?
CVE-2026-70402 is a medium-severity vulnerability in Gitea, published on 14 Oct 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Weakness: CWE-732
Which versions are affected by CVE-2026-70402?
How do I fix CVE-2026-70402?
No fix has been published for CVE-2026-70402 yet. Limit exposure of the affected software until one is available.
Is CVE-2026-70402 being exploited?
There is no known exploitation of CVE-2026-70402 in the wild and no public exploit code.
Sources
Also known as GHSA-pq8x-xpgp-rvmh.