CVE-2026-70402 Details
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.
A vulnerability in Gitea versions through 1.27.2 allows local code execution as the Gitea service account. This issue arises because Gitea creates server-side Git hook directories and scripts with permissions set to 0777, relying on the process umask to restrict access. In environments with a permissive umask, such as 0000 or 0002, the resulting files or directories become group- or world-writable. Consequently, a local user with access to the repository storage can modify a hook or add an executable to a writable hook directory. When a subsequent Git operation is performed, the file is executed as the Gitea service account, potentially leading to unauthorized actions such as modifying repositories or accessing files.
Gitea has released a patch in version 1.27.3. Users should upgrade to this version. Additionally, Gitea can be run with a restrictive umask of 0022 or tighter, and it's important to ensure that the repository storage is not writable by untrusted local users.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 14, 2026CISA-ADP
Assessed Oct 14, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://blog.gitea.com/release-of-1.27.3/ | Gitea Limited | Release NotesVendor |
| https://github.com/go-gitea/gitea/pull/39008 | Gitea Limited | Issue TrackingVendor |
| https://github.com/go-gitea/gitea/pull/39016 | Gitea Limited | Issue TrackingVendor |
| https://github.com/go-gitea/gitea/releases/tag/v1.27.3 | Gitea Limited | Release NotesVendor |
| https://github.com/go-gitea/gitea/security/advisories/GHSA-pq8x-xpgp-rvmh | Gitea Limited | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-732 | Incorrect Permission Assignment for Critical Resource | Gitea Limited |
Affected Products
| Product | Versions |
|---|---|
| Gitea | <= 1.27.2 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 14, 2026 | CVE Modified | CISA-ADP |
| Oct 14, 2026 | New CVE Received | Gitea Limited |
Volerion