CVE-2026-59774: Gitea Org-mode #+INCLUDE lets anonymous users read server files, then RCE

Critical 9.8 EPSS 28.3%

Gitea's repository markup endpoint (POST /{owner}/{repo}/markup) renders Org-mode text with a #+INCLUDE directive that can read any absolute path, and anonymous users may call it for any public repository. An unauthenticated attacker can read files readable by the Gitea service account, including app.ini; with the INTERNAL_TOKEN from it they can inject a Git hook through the internal logger and run commands as the Gitea OS user. Found by XBOW and fixed in Gitea 1.27.1 together with CVE-2026-60004, which CISA lists as exploited. Rated CVSS 9.8.

What do these terms mean? CVE · CVSS score · exploited (KEV) · EPSS · backported fix · all terms

What to do now

  1. Check whether you run the affected software and which version (commands below).
  2. Install the fixed version for your system: see “Patch it” below.
  3. Restart Gitea with the new binary or image. If the instance had public repositories and was reachable while vulnerable, rotate INTERNAL_TOKEN, SECRET_KEY, OAuth/JWT secrets and database credentials stored in app.ini, and check Git hooks and the global Git configuration for unexpected changes.
  4. If you cannot patch today, apply the temporary mitigation below and patch as soon as possible.

Affected and fixed versions

Affected:

Fixed in:

Am I affected?

gitea --version
curl -s https://<your-gitea-host>/api/v1/version
docker exec gitea gitea --version

Patch it

Use the commands for your system. Distribution packages often keep an older version number with the fix backported, so compare with the fixed package versions in the table below, not only with the upstream version.

Docker images
docker pull docker.gitea.com/gitea:1.27.2   # 1.27.1 or later
# in docker-compose.yml set: image: docker.gitea.com/gitea:1.27.2
docker compose up -d
Built from source
# official binary install (docs.gitea.com); back up the data directory and database first
wget -O gitea https://dl.gitea.com/gitea/1.27.2/gitea-1.27.2-linux-amd64   # 1.27.1 or later
chmod +x gitea
sudo systemctl stop gitea
sudo cp gitea /usr/local/bin/gitea
sudo systemctl start gitea

General update steps for every system are on the Linux and Unix & BSD pages; after updating, see which services to restart.

If you cannot patch yet

Related vulnerabilities

Sources

Page generated automatically from official sources on 2026-11-03 18:05 UTC and reviewed by an editor. Always confirm with your vendor's advisory.