Gitea local code execution through writable Git hooks
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.
CVE-2026-70402
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2026-70402
Gitea
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"vendor": "Gitea",
"product": "Gitea",
"versions": [
{
"status": "affected",
"version": "0",
"versionType": "semver",
"lessThanOrEqual": "1.27.2"
}
],
"packageName": "code.gitea.io/gitea",
"defaultStatus": "unaffected"
}
]- Related CVEs
- CVE-2026-70402
Source reference:
/cveMetadata/cveId
Publisher severity
No explicit severity was provided.
- Event
- #22085 · Revision 1
- Added to Heist Feed
- Publisher date