CVE-2026-70402

Gitea local code execution through writable Git hooks

State
Published
Severity
5.8 Medium
Published
Oct 14, 2026
Updated
Oct 14, 2026
Reserved
Aug 13, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.15.8 MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:LCISA-ADP

Weaknesses

  • CWE-732 Incorrect Permission Assignment for Critical Resource

Affected Products

ProductVersions
GiteaGitea
  • 1.27.2 and earlierAffected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.