External risk intelligence

Forgejo Remote Code Execution via Template Expansion Vulnerability

CVE advisorySeverity: CRITICAL (CVSS 9.9)

CVE-2026-89094

Forgejo is a self-hosted software forge and Git platform. These platforms are commonly deployed as web-facing services to allow remote access for collaborative development, code hosting, and CI/CD operations, making the attack surface frequently accessible from the internet.

Remote Code Execution

Halo Surface Signal: 4 out of 5 — likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

This vulnerability in Forgejo could allow an unauthenticated attacker to execute arbitrary code on affected systems. The issue stems from how the platform handles template expansion within its repository features. If exploited, it could lead to significant compromise of the forgejo instance.

  • A code execution flaw exists in Forgejo's template handling.
  • This could impact code hosting and collaboration services.
  • Confirm relevance and assess exposure to Forgejo instances.

Attack Path

How an attacker could exploit the issue

An attacker with low-privileged access to Forgejo could exploit a vulnerability in how it processes template repositories. By creating a specially crafted template repository, an attacker could trigger mishandling during template expansion within the `.forgejo/template` directory, potentially leading to remote code execution.

  • Requires authenticated, low-privileged access.
  • Crafted template repository triggers vulnerable expansion.
  • Leads to unauthorized remote code execution.

Live Threat

Current exploitation, exposure, and threat context

A vulnerability exists in Forgejo that could allow remote code execution when a specially crafted template repository is used. This occurs due to mishandling of template expansion within `.forgejo/template` files.

  • Code execution.
  • Crafted template repository.
  • Compromised forgejo instance.

Operational Fix

Recommended remediation, mitigation, and detection steps

Forgejo administrators and platform teams are likely responsible for addressing this remote code execution vulnerability. The first practical step is to inventory all Forgejo instances, determine their exposure and business criticality, and identify the accountable owners for each. Once these are confirmed, a remediation plan can be developed based on the assessed risk.

  • Application or platform owners should manage remediation.
  • Verify all Forgejo instance exposure and criticality.
  • Plan updates or implement temporary risk reduction.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is Forgejo?

Forgejo is a self-hosted software forge and Git platform. It is designed to manage source code, facilitate collaborative development, and support CI/CD operations, providing a centralized environment for teams to host and share repositories similarly to other popular web-based code management services.

What does CWE-1336 mean for CVE-2026-89094?

CWE-1336 refers to the improper neutralization of special elements used in a template engine. In the context of this CVE, it means the software fails to properly sanitize or constrain template files, allowing an attacker to manipulate the template expansion process and execute unauthorized code.

How is this Forgejo vulnerability triggered?

The flaw is triggered when the system processes a specially crafted template repository containing files in the .forgejo/template directory. It does not occur through standard Git repository hosting; rather, it requires the specific use of the platform's template expansion feature during the repository handling process.

Do I need to worry if my Forgejo instance is internal?

Halo Surface Signal indicates that Forgejo is commonly deployed as a web-facing service for remote collaboration, making many instances accessible from the internet. However, regardless of internet exposure, any environment where users can create template repositories presents a risk, as the vulnerability requires authenticated access.

How should I respond to this Forgejo threat?

Start by identifying all Forgejo instances within your infrastructure and determining who is responsible for their maintenance. Once identified, evaluate the criticality of each instance and coordinate with the owners to implement updates or risk reduction measures to mitigate the potential for unauthorized code execution.

References