Home › Vulnerabilities

Gitea Flaw CVE-2026-125423: Update Now

Published November 16, 2026 · Last updated November 16, 2026

CVE Patch

CVE-2026-125423 is a serious flaw in Gitea, a self-hosted Git service that organizations run on their own servers to host code. A signed-in user who is allowed to create and push to a repository can, under certain conditions, make the server run commands of their choosing. Gitea fixed it in version 28.4.0, released on November 15, 2026. The same release fixes a second high-severity bug, CVE-2026-123006, that exposes password hashes to any logged-in user, along with more than a dozen other issues.

Neither flaw appears in the U.S. Cybersecurity and Infrastructure Security Agency's (CISA) Known Exploited Vulnerabilities catalog, and Gitea's advisories do not report attacks in the wild.

Who is affected

According to Gitea's security advisory (GHSA-6m4f-m9vc-7946), every Gitea release up to and including 28.3.0 is vulnerable, and 28.4.0 is the patched version. The reporter says they confirmed command execution in a lab on Gitea 28.3.0, 28.2.0, 1.27.1 and 1.25.5, using SQLite, MySQL and PostgreSQL databases.

The instances at risk are those where ordinary users can create their own repositories, for example servers with open sign-up. The attacker needs a normal account, not an administrator account.

What goes wrong

The bug is a race in how Gitea sets up a brand-new repository when the "initialize repository" option (auto_init) is chosen. In plain terms, the advisory describes this sequence:

  • Gitea creates the repository record first and finishes initialization afterwards. In that short gap, the new repository can already accept a push.
  • The attacker pushes a tree in which README.md is not a normal file but a Git symbolic link pointing at one of Gitea's own server-side hook scripts.
  • If that push lands in time, Gitea clones the repository into a temporary folder to build the first commit and checks out the attacker's tree.
  • Gitea then writes its generated README. Because the file is a symbolic link, the write follows the link and overwrites the executable hook. The README text includes the repository description, which the attacker controls.
  • Gitea's own initial push triggers that hook, so the description runs as shell commands.

The advisory classifies the weakness as CWE-59 (following a link to the wrong file) and CWE-362 (a race condition).

Conditions and limits

Exploitation is not guaranteed. The reporter lists several requirements: a user who may create repositories and push to them, initialization with the default README template, winning the timing race, server-side support for Git symbolic links, a storage layout in which the link can reach the hook file, and a hook interpreter (normally bash). Nonstandard temporary or repository paths may stop this particular payload, though the reporter did not test whether such setups are safe in general.

The reporter also says plainly that they are not claiming unauthenticated exploitation, root access, container escape or compromise of the underlying host. Commands run with the privileges of the operating-system account that runs Gitea. That account can still reach repositories, configuration, credentials and database contents.

One detail matters for administrators: according to the advisory, setting DISABLE_GIT_HOOKS=true "does not by itself close this chain", because Gitea still creates and uses its internal delegate hooks during repository initialization.

Severity and who scored it

Gitea's advisory rates the issue High with CVSS 3.1 8.5, vector AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H. That means network access, high attack complexity (the race), a low-privileged account, no victim interaction, changed scope, and high impact on confidentiality, integrity and availability. Gitea is the CVE Numbering Authority for these records. The published CVE record itself carries no CVSS score; the 8.5 comes from Gitea's advisory, and NVD had not posted its own assessment when we checked.

Also fixed in 28.4.0

Gitea published 20 advisories on November 15. The most severe by score is CVE-2026-123006 (GHSA-frjx-8pcw-8c9q), rated CVSS 3.1 8.8. According to that advisory, any signed-in user, with no special privileges, could read "the password hash, hash algorithm, salt, rands and primary email" of the owner of any public repository with a latest commit status, through the repository search endpoint. The advisory warns this gives attackers "offline cracking material and account enumeration." It affects versions 28.0.0 through 28.3.0.

Other high-rated advisories fixed in 28.4.0 include:

  • CVE-2026-123638 (8.5): a bypass of branch protection "Protected file patterns" using specially quoted file names.
  • CVE-2026-123065 (8.5): cross-repository deletion of attachment files through the release edit form.
  • CVE-2026-123002 (8.2): unlimited guessing of two-factor (TOTP) codes once a password is known.
  • CVE-2026-123009 (7.7): a privilege bypass in the web file editor that can expose a private base repository.
  • CVE-2026-118535 (7.3): workflow trust that survives a repository transfer.

The fix

Gitea's 28.4.0 changelog lists the fix as "Do not check out existing repo content during auto-init" (pull request 40376) and, for the password-hash leak, "Limit the commit status fields returned by repo search" (pull request 40377). Both advisories name 28.4.0 as the patched version.

What to do

  • Gitea administrators: upgrade to 28.4.0 or later. This is the only fix named in the official advisories.
  • If you cannot upgrade right away: reduce who can create repositories, for example by closing open registration. Do not rely on DISABLE_GIT_HOOKS alone, since the advisory says it does not stop this chain. This interim step is our suggestion, not Gitea's guidance.
  • After upgrading: because CVE-2026-123006 exposed password hashes to signed-in users, consider asking owners of public repositories, especially administrators, to change their passwords and enable two-factor authentication. This is also our suggestion.
  • Teams that use a hosted or packaged Gitea: ask your provider whether it has moved to 28.4.0.

Timeline

  • November 15, 2026, 14:39 ET: Gitea 28.4.0 released on GitHub.
  • November 15, 2026, 16:03 ET: Gitea published GHSA-6m4f-m9vc-7946, GHSA-frjx-8pcw-8c9q and 18 other advisories.
  • November 15, 2026, 16:10 ET: CVE-2026-125423 published by Gitea.

Sources

  • Gitea advisory GHSA-6m4f-m9vc-7946: https://github.com/go-gitea/gitea/security/advisories/GHSA-6m4f-m9vc-7946
  • Gitea advisory GHSA-frjx-8pcw-8c9q: https://github.com/go-gitea/gitea/security/advisories/GHSA-frjx-8pcw-8c9q
  • Gitea 28.4.0 release: https://github.com/go-gitea/gitea/releases/tag/v28.4.0
  • CVE record: https://www.cve.org/CVERecord?id=CVE-2026-125423
  • Fix pull request: https://github.com/go-gitea/gitea/pull/40376

Sources

General education only, not security advice. Facts checked against the sources above on the date shown.