Summary
CVE-2026-59774 is a critical path traversal / arbitrary file read vulnerability in Gitea’s Org-mode markup renderer. It can be escalated to remote code execution. It affects Gitea 1.22 through 1.27.0 and has a CVSS v3.1 base score of 9.8 (Critical).
Technical details
- Root cause: Gitea’s Org-mode renderer (go-org) doesn’t restrict
#+INCLUDEdirectives when it processes repository markup. It keeps a default file-read callback (CWE-22). - Trigger: An attacker submits Org-mode markup containing an
#+INCLUDEdirective that points to a local file. The markup is submitted through a public repository. - Attack vector: Network. No authentication or user interaction is required.
- Impact: An unauthenticated attacker can read files the Gitea server can access. If the attacker obtains
app.iniand itsINTERNAL_TOKEN, they can modify Git hooks and execute code as the Gitea service account.
Affected software
- Gitea 1.22 through 1.27.0 (inclusive). The public detection template lists 1.22.1 through 1.27.0.
- Fixed in Gitea 1.27.1 and later.
Severity
- CVSS v3.1 base score: 9.8 (Critical)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Mitigation and recommended actions
- Immediate: Upgrade Gitea to 1.27.1 or later.
- If you can’t patch right away, restrict network access to the Gitea instance. Because exploitation may expose
app.iniandINTERNAL_TOKEN, rotate the secrets on any instance that was exposed while vulnerable. Review the Git hooks in your repositories for unexpected changes.

