---
id: CVE-2026-89094
title: >-
  Forgejo before 16.0.4 allows remote code execution via a crafted template
  repository because template expansion on files in .forgejo/template is
  mishandled.
summary: >-
  Forgejo before 16.0.4 allows remote code execution via a crafted template
  repository because template expansion on files in .forgejo/template is
  mishandled.
severity: critical
cvss: 9.9
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H'
cwe:
  - CWE-1336
vendor: Forgejo
product: Forgejo
affected:
  - Forgejo >= 16.0.0 < 16.0.4
  - Forgejo < 15.0.8
published: '2026-09-10'
updated: '2026-09-22'
sourceUpdated: '2026-09-22T20:00:03.713'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-89094'
references:
  - url: 'https://codeberg.org/forgejo/forgejo/milestone/139655'
    label: cve@mitre.org
  - url: 'https://news.ycombinator.com/item?id=49645907'
    label: cve@mitre.org
tags:
  - nvd
  - cve.org
epss: 0.005
epssPercentile: 0.41861
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: total
  timestamp: '2026-09-14T15:35:34.350911Z'
ingestedAt: '2026-09-13T20:19:18.505Z'
---

## Overview

Forgejo before 16.0.4 allows remote code execution via a crafted template repository because template expansion on files in .forgejo/template is mishandled.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
