Bug 2552325 (CVE-2026-70402)

Summary: CVE-2026-70402 code.gitea.io/gitea: Gitea: Privilege escalation via insecure Git hook directory permissions
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerability-draftAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: gbenhaim, niyer, twaugh
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in Gitea. Gitea creates server-side Git hook directories and scripts with overly permissive file permissions, relying on the process file-creation mask (umask) to restrict access. In environments with a permissive umask, a local attacker with access to the repository storage can modify or place executable files within the hook directory. This issue allows the attacker to achieve privilege escalation by executing arbitrary code under the Gitea service account during subsequent Git operations.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2026-10-14 14:41:56 UTC
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.