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.
Published: 2026-10-14
Score: 5.8 Medium
EPSS: n/a
KEV: No
Impact: Local code execution (privilege escalation)
Action: Apply Patch
AI Analysis

Impact

Gitea creates server‑side Git hook directories and scripts with read/write/execute permissions for all users (mode 0777) and depends on the process umask to limit access. When the umask is permissive, such as 0000 or 0002, a local user who can reach the repository storage can add or modify a hook file. Upon the next Git operation, the Gitea service account will execute that file, enabling the local attacker to run arbitrary code with the privileges of the Gitea service process.

Affected Systems

The affected product is Gitea (the open‑source Git management system). Versions prior to 1.27.3 are vulnerable; the issue has been closed in the 1.27.3 release.

Risk and Exploitability

The CVSS score of 5.8 indicates a medium severity vulnerability. EPSS data is unavailable and the vulnerability is not listed in the CISA KEV catalog, so the likelihood of exploitation in the wild is not quantified. However, the attack requires only local access to the repository storage and a permissive umask, making the exploit straightforward for a local user with file‑system access. Successful exploitation leads to execution of arbitrary code under the Gitea service account, potentially compromising the entire instance.

Generated by OpenCVE AI on October 15, 2026 at 01:34 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Gitea to version 1.27.3 or later, which removes the permissive permissions on hook directories.
  • Re‑apply appropriate ownership and permissions to the repository and hook directories, ensuring they are owned by the Gitea service account and not writable by other users.
  • Configure a stricter system umask (e.g., 0022) so that new files default to mode 0755 or less, reducing the possibility of unintended write access.

Generated by OpenCVE AI on October 15, 2026 at 01:34 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 14 Oct 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 5.8, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 14 Oct 2026 14:45:00 +0000

Type Values Removed Values Added
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.
Title Gitea local code execution through writable Git hooks
Weaknesses CWE-732
References

Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: Gitea

Published:

Updated: 2026-10-14T15:03:17.928Z

Reserved: 2026-08-13T16:50:59.184Z

Link: CVE-2026-70402

cve-icon Vulnrichment

Updated: 2026-10-14T14:55:25.687Z

cve-icon NVD

Status : Deferred

Published: 2026-10-14T15:17:22.467

Modified: 2026-10-14T16:17:51.930

Link: CVE-2026-70402

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-15T01:45:11Z

Weaknesses
  • CWE-732

    Incorrect Permission Assignment for Critical Resource