CVE-2026-89094

Remote Code Execution in Forgejo Template Repository

Published Sep 10, 2026 CVSS 3.1 · 9.9 Critical EPSS < 1% KEV · Not listed
Description
Forgejo before 16.0.4 allows remote code execution via a crafted template repository because template expansion on files in .forgejo/template is mishandled.

Analysis

AI-generated

Technical impact

Forgejo before version 16.0.4 is vulnerable to remote code execution due to mishandling of template expansion on files located in the ".forgejo/template" directory. An attacker who can create a crafted template repository can execute arbitrary code on the server. The flaw is rooted in the improper handling of template rendering, identified as CWE-1336.

Affected Systems

The affected vendor is Forgejo, product Forgejo. All installations running any are vulnerable. If the exact version is unknown, any instance of Forgejo below 16.0.4 should be considered at risk.

Risk and Exploitability

The vulnerability has a CVSS score of 9.9, indicating critical severity. The EPSS score is currently unavailable, and the vulnerability is not listed in CISA’s KEV catalog. The likely attack vector is remote malicious template repository. Once a template is rendered, the attacker can execute code with the privileges of the Forgejo service, potentially compromising the entire system.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the official Forgejo update to version 16.0.4 or later. This patch corrects the template expansion logic and removes the execution vector.
  • If upgrading immediately is not possible, disable the template feature or restrict repository owners from creating templates by configuring repository permissions or deleting the ".forgejo/template" directory from the filesystem. This prevents the vulnerability from being triggered.
  • Configure the web server or application container so that any files in the template directory are not executable, and enforce strict permissions to block code execution. This forms an additional defense in depth while a full upgrade is being prepared.

Generated by OpenCVE AI on September 10, 2026 at 22:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
Title Remote Code Execution in Forgejo Template Repository
Type Values Removed Values Added
Description Forgejo before 16.0.4 allows remote code execution via a crafted template repository because template expansion on files in .forgejo/template is mishandled.
First Time appeared Forgejo
Forgejo forgejo
Weaknesses CWE-1336
CPEs cpe:2.3:a:forgejo:forgejo:*:*:*:*:*:*:*:*
Vendors & Products Forgejo
Forgejo forgejo
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-1336

    Improper Neutralization of Special Elements Used in a Template Engine

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Sep 14, 2026, 3:41 PM
Reserved
Sep 10, 2026, 8:42 PM
Status
Deferred
Published
Sep 10, 2026, 9:17 PM
Modified
Sep 22, 2026, 8:00 PM