CVE-2026-89094: Forgejo template repository expansion plants .git folder for host RCE
Critical 9.9 EPSS 0.9% Gitea / Forgejo
When Forgejo creates a repository from a template, it expands variables in files listed in .forgejo/template before initializing the new Git repository. A malicious template repository could use this expansion to create a new .git folder that git then adopts, letting the attacker read arbitrary data from the Forgejo host and execute arbitrary processes on it. Any user able to create a repository from an attacker-controlled template can trigger it; Forgejo labels the fix critical and the CVE is scored CVSS 9.9.
- CVE-2026-89094CVE identifier
- 9.9CVSS 3.1 base score (critical)
- 0.9%EPSS: chance of exploitation in the next 30 days (higher than 58% of CVEs)
- 2026-09-10published
What do these terms mean? CVE · CVSS score · exploited (KEV) · EPSS · backported fix · all terms
What to do now
- Check whether you run Gitea / Forgejo and which version (commands below).
- Install the fixed version for your system: see “Patch it” below.
- Restart Forgejo with the new binary or image.
Affected and fixed versions
Affected:
- Forgejo before 16.0.4
- Forgejo 15.0.x before 15.0.8
Fixed in:
- Forgejo 16.0.4
- Forgejo 15.0.8
Am I affected?
forgejo --version
curl -s https://<your-forgejo-host>/api/v1/version
docker exec forgejo forgejo --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.
Debian
not in distro repos: upstream binaryUbuntu
not in distro repos: upstream binaryRHEL, AlmaLinux, Rocky, Oracle
sudo dnf upgrade --refresh forgejo (EPEL; Gitea: upstream binary)Fedora
sudo dnf upgrade --refresh forgejoSUSE / openSUSE
not in Leap 16: upstream binaryAmazon Linux
not packaged: upstream binaryArch Linux
sudo pacman -SyuAlpine
apk update && apk upgrade gitea forgejo (or forgejo-lts)FreeBSD
pkg update && pkg upgrade gitea forgejo (or forgejo-lts)Docker images
docker pull codeberg.org/forgejo/forgejo:16.0.4 # rootless: 16.0.4-rootless; 15 line: 15.0.8
# set the new tag in docker-compose.yml, then:
docker compose up -dBuilt from source
# binary install; back up the data directory and database first
wget -O forgejo https://codeberg.org/forgejo/forgejo/releases/download/v16.0.4/forgejo-16.0.4-linux-amd64
chmod +x forgejo
sudo systemctl stop forgejo
sudo cp forgejo /usr/local/bin/forgejo
sudo systemctl start forgejoGeneral update steps for every system are on the Linux and Unix & BSD pages; after updating, see which services to restart.
Related vulnerabilities
Sources
- Forgejo 16.0.4 release notes
- Forgejo 15.0.8 release notes
- Forgejo PR #14301 (fix)
- Forgejo milestone 16.0.4
- https://news.ycombinator.com/item?id=49645907
- CVE-2026-89094 on CVE.org
- CVE-2026-89094 on NVD
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.