CVE-2026-59774

Gitea Org-mode file disclosure and code execution

Published Oct 14, 2026 CVSS 3.1 · 9.8 Critical EPSS 7.7% KEV · Not listed
Description
Gitea's Org-mode markup renderer processes INCLUDE directives supplied to the repository markup endpoint without preventing access to server-side files. An unauthenticated attacker can use a suitable public repository to read files accessible to the Gitea service account. If the disclosed files include app.ini and its INTERNAL_TOKEN, the attacker can chain the disclosure with internal logger access to modify a Git hook and execute commands as the Gitea service account.

Analysis

AI-generated

Technical impact

Gitea's Org-mode renderer can process INCLUDE directives in repository markup without validating that referenced files reside within the repository. This flaw permits an unauthenticated user to read any file readable by the Gitea service account and represents a path traversal weakness (CWE-22). If the target contains configuration such as app.ini with an INTERNAL_TOKEN, the attacker can chain this disclosure with internal logger access to modify a Git hook, enabling arbitrary command execution as the Gitea service account.

Affected Systems

All Gitea installations running a version older than 1.27.1 are vulnerable. The issue was addressed in release 1.27.1, which patches the Org-mode INCLUDE handling to restrict file access.

Risk and Exploitability

The advisory assigns a CVSS score of 9.8, indicating high severity. The EPSS score of 8% indicates a low to moderate probability of exploitation. The vulnerability is not listed in the CISA KEV catalog. Attackers can exploit the flaw from any public repository without authentication, leveraging the service account's file system access to read sensitive configuration and subsequently execute code by tampering with Git hooks. Detection would involve monitoring for unusual file reads and hook modifications.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Gitea to version 1.27.1 or later.
  • Verify that the service account running Gitea has the least required privileges and deny write access to sensitive files when possible.
  • Monitor repository hooks and internal logs for unauthorized changes and unexpected execution attempts.

Generated by OpenCVE AI on November 25, 2026 at 21:37 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea
Vendors & Products Gitea
Gitea gitea
Type Values Removed Values Added
References
Metrics cvssV3_1

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

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Gitea's Org-mode markup renderer processes INCLUDE directives supplied to the repository markup endpoint without preventing access to server-side files. An unauthenticated attacker can use a suitable public repository to read files accessible to the Gitea service account. If the disclosed files include app.ini and its INTERNAL_TOKEN, the attacker can chain the disclosure with internal logger access to modify a Git hook and execute commands as the Gitea service account.
Title Gitea Org-mode file disclosure and code execution
Weaknesses CWE-22
References
Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Sources

Status
PUBLISHED
Assigner
Gitea
Published
Updated
Oct 15, 2026, 3:56 AM
Reserved
Jul 8, 2026, 9:19 AM
Status
Deferred
Published
Oct 14, 2026, 3:17 PM
Modified
Oct 15, 2026, 4:18 AM