Skip to main content
Vulnerability Database/CVE-2026-96580

CVE-2026-96580: Gitea Workflow Matrix DOS Vulnerability

CVE-2026-96580 is a denial of service flaw in Gitea affecting workflow matrix expansion. Attackers can submit small workflow files that expand to exhaust server memory. This article covers technical details, affected versions, impact, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-96580 Overview

CVE-2026-96580 is a resource exhaustion vulnerability [CWE-400] in Gitea's workflow execution subsystem. Gitea expanded a workflow's static strategy.matrix into its full Cartesian product without a size limit when creating a run. The expansion occurred before the fork pull request approval gate applied. A user who can open a pull request from a fork could submit a small workflow file whose matrix expands to a very large number of jobs. The expansion consumes server memory and can terminate the Gitea process. No runner is required to trigger the condition.

Critical Impact

Unauthenticated or low-privileged fork contributors can crash a Gitea instance by submitting a crafted workflow whose matrix expands into millions of job combinations.

Affected Products

  • Gitea versions prior to 28.0.0
  • Gitea Actions workflow runner (server-side expansion path)
  • Self-hosted Gitea deployments accepting fork pull requests

Discovery Timeline

  • 2026-10-06 - CVE-2026-96580 published to NVD
  • 2026-10-07 - Last updated in NVD database

Technical Details for CVE-2026-96580

Vulnerability Analysis

Gitea Actions supports workflow matrices that let a single job definition run across multiple parameter combinations. When Gitea receives a pull request event, it parses the workflow file and expands the static strategy.matrix block into its full Cartesian product to enqueue individual jobs. The expansion step ran unconditionally during run creation, with no cap on the resulting job count. The fork pull request approval gate, which requires maintainer approval before executing untrusted contributor code, applied only after expansion completed. A contributor could therefore force the server to allocate memory for an arbitrarily large job list without any runner ever picking up the work.

Root Cause

The root cause is missing input validation on the size of the matrix Cartesian product before expansion. The code path treated the matrix as trusted structured data rather than attacker-controlled input requiring bounds enforcement. Combined with the ordering of the approval gate, this created a pre-authorization denial of service primitive against the Gitea process itself.

Attack Vector

An attacker forks a public repository hosted on a Gitea instance and commits a workflow file containing a strategy.matrix with several dimensions whose combined Cartesian product reaches millions of entries. The attacker opens a pull request targeting the upstream repository. Gitea parses the workflow and attempts to materialize the full job list in memory. The server allocates increasing amounts of memory until the operating system kills the process or the instance becomes unresponsive. The fork approval requirement never triggers because the crash occurs during run creation. See the GitHub Security Advisory GHSA-p3rv-cr5f-9gjh for the full technical write-up.

Detection Methods for CVE-2026-96580

Indicators of Compromise

  • Sudden Gitea process termination or OOM kill events in system logs correlated with pull request creation from forked repositories
  • Rapid memory growth in the Gitea server process immediately after a webhook or UI-driven pull request event
  • Workflow files in fork pull requests containing strategy.matrix blocks with multiple high-cardinality dimensions

Detection Strategies

  • Inspect pull request diffs for .gitea/workflows/*.yml or .github/workflows/*.yml files introducing or modifying strategy.matrix entries
  • Alert on Gitea process restarts, segmentation faults, or systemd service failures that follow inbound pull request traffic
  • Monitor repository audit logs for pull requests opened by newly created accounts targeting repositories with Gitea Actions enabled

Monitoring Recommendations

  • Enable host-level memory and process telemetry on Gitea servers and forward it to a central log store for correlation
  • Track Gitea application logs for errors emitted during workflow parsing and run creation
  • Review fork pull request activity against repositories that have Actions enabled, especially from untrusted contributors

How to Mitigate CVE-2026-96580

Immediate Actions Required

  • Upgrade all Gitea instances to version 28.0.0 or later, where static matrices above 256 combinations are rejected before expansion
  • Audit existing repositories for workflow files containing oversized matrix definitions and remove or constrain them
  • Restrict Gitea Actions to trusted repositories until the upgrade is applied

Patch Information

The fix shipped in Gitea 28.0.0. The change rejects any static strategy.matrix whose Cartesian product exceeds 256 combinations before any expansion occurs, moving the validation ahead of the fork approval gate. Review the Gitea Release v28.0.0, the Gitea Release Announcement 28.0.0, and the implementing GitHub Pull Request #39295 for exact code changes.

Workarounds

  • Disable Gitea Actions globally by setting [actions] ENABLED = false in app.ini until the patched release is deployed
  • Disable Actions on individual public repositories that accept fork pull requests from untrusted contributors
  • Place Gitea behind a reverse proxy that enforces strict request size and rate limits on pull request creation endpoints
bash
# Configuration example: disable Gitea Actions in app.ini
[actions]
ENABLED = false

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.