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

Published Oct 14, 2026
·
Updated

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.

Affected Software

1 affected component
Gitea Gitea

Event History

Oct 14, 2026
CVE Published
via MITRE·02:36 PM
Data Sourced
via MITRE·02:36 PM
DescriptionWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Instances are exposed when Gitea runs with a permissive process umask, such as 0000 or 0002, and another local user can access the repository storage. The issue requires local access; the provided information does not indicate a remote-only attack path.

2

What must an attacker do to exploit it?

An attacker needs local access sufficient to reach the repository storage and modify a server-side Git hook or place an executable in a writable hook directory. A subsequent Git operation must then run and execute the attacker-controlled file as the Gitea service account.

3

Are default permissions necessarily affected?

No. Gitea creates the relevant hook directories and scripts with mode 0777, but relies on the service process umask to restrict effective access. Exposure depends on the configured umask being permissive, such as 0000 or 0002.

4

What can be done if patching is not immediately possible?

Restrict local users' access to Gitea repository storage and ensure the Gitea service does not use a permissive umask. Review hook directories and scripts for unauthorized modifications or unexpected executables before allowing further Git operations.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203