Skip to content

SecurityIndependently confirmed2 publishers2 min readPublished Updated

CVE-2026-52806 turns a Gogs branch name into command execution as the git user

Rapid7 scored it 9.9 and Gogs shipped 0.14.3 on June 7, 2026. The reason it rates that high is configuration: open registration and unlimited repository creation let a stranger own the repo they attack from.

The Watch · Security desk

How we use AISend a correction

Illustration accompanying CVE-2026-52806 turns a Gogs branch name into command execution as the git user
Generated illustration

What happened

  • Rapid7 Labs disclosed CVE-2026-52806, a CWE-88 argument injection scored CVSSv3.1 9.9, which lets any authenticated Gogs user run commands as the server process user through a crafted pull request.
  • Gogs defaults do the reachability work: open registration and no repository creation limit mean a stranger can sign up, own a fresh repository, and enable rebase merging without touching another account.
  • Confirmed affected are Gogs 0.14.2 and the 0.15.0+dev branch at commit b53d3162, with earlier releases that support the rebase merge style rated likely vulnerable as well.
  • The Gogs maintainer accepted Rapid7's patch and released 0.14.3 on June 7, 2026, with the identifier issued through GHSA-qf6p-p7ww-cwr9.
  • Rapid7's Shodan query for visible Gogs sign-in pages returned 1,141 internet-facing instances at the time of publication.

Why it matters

  • exposure One account on a shared instance reaches every other tenant's private repositories plus the database of password hashes, API tokens, SSH keys and 2FA secrets, so the incident scope is every user on the box rather than the attacker's own project.
  • constraint Because filesystem-level writes bypass Gogs' audit logging, the instance's own records will not evidence repository tampering, and integrity verification has to be done against Git objects from outside the application.
  • contradiction runZero's asset-hunting guidance still reports no CVE and no vendor patch while Rapid7 names both, so a team triaging from the inventory page will stop at configuration hardening and never schedule the upgrade.
  • precedent A default configuration that hands an unauthenticated visitor the privileges the exploit needs argues for treating self-hosted Git under the patch SLA of a public web application, not an internal tool.

Four actions, all inside the attacker's own account: sign up, create a repository, flip one setting in it, open a pull request [19]. The flaw sits in the last step. According to runZero, Gogs hands the pull request's source branch name straight to `git rebase` without a `--` delimiter to mark the end of options [3], so a branch name beginning with --exec is parsed as a flag and its value runs as a command during the rebase merge [2].

Version 0.14.2 is the awkward part. runZero's own timeline lists 0.14.2 as the fix for CVE-2026-25921, the March 2026 cross-repository LFS overwrite scored 9.3 and reachable without authentication [14]. Rapid7 lists 0.14.2 as confirmed vulnerable to 52806. Anyone who upgraded in March to clear the LFS bug is sitting on the June one, and 0.14.3 is the first build that satisfies both [17].

Execution lands as the Gogs process user, which on Docker installs is git at UID 1000 and on binary installs is whatever account the administrator chose [16]. Every repository on the instance then sits under one REPOSITORY_ROOT with no OS-level isolation between them [7]. That is the same shape as the LFS flaw, where all objects shared a single location without per-repository separation [14]; in both cases one tenant gets leverage over another tenant's data because nothing separates them on disk [20].

This is the third separately tracked Gogs flaw in the seven months from December 2025 to June 2026 [18]. The first, CVE-2025-8110, was an authenticated arbitrary file overwrite scored 7.8 in versions 0.13.3 and earlier, and runZero notes evidence of exploitation in the wild for it [15]. That is the closest thing available to a base rate for attacker interest in this software.

The 1,141 figure is a floor. It counts hosts whose Gogs sign-in title is visible to Shodan, and Rapid7 says the real install base is much larger because most instances sit behind VPNs or on internal networks [8]; a project carrying roughly 50,000 GitHub stars and 5,000 forks is not deployed 1,141 times [11][21]. For instances that cannot restart on 0.14.3 quickly, runZero's configuration advice still applies: DISABLE_REGISTRATION = true, MAX_CREATION_LIMIT = 0, and no internet path to the web interface [13]. Rapid7's own triage line is the account count. Any Gogs instance with more than one user is effectively multi-tenant, and on those, a single member holds everything the git user can read [10].

What to watch

  • Whether exploitation of CVE-2026-52806 is observed in the wild, as runZero recorded for CVE-2025-8110.
  • Whether inventory vendors update their Gogs entries to name the CVE and 0.14.3 as the fix.
  • Whether the Shodan sign-in count moves after June 7, the only public read on 0.14.3 adoption.

Clarity's read

What the record supports and how the coverage leans. The claims behind it follow.

Reality

Evidence86
Adoption50
Hype gap+8
Incentives72
Confidence70
Why these scores

Claim ledger

Ranked by verification strength, evidence, and original report placement.

  1. [1]

    Rapid7 Labs discovered CVE-2026-52806, an argument injection (CWE-88) flaw in Gogs scored CVSSv3.1 9.9 (Critical), allowing any authenticated user to achieve remote code execution on the server via a pull request; the exploit requires no admin privileges and no interaction with other users.

  2. [2]

    The malicious branch name injects the --exec flag into git rebase during the "Rebase before merging" merge operation, producing arbitrary command execution as the Gogs server process user.

  3. [3]

    runZero describes the cause as a malicious pull request branch name passed directly to the git rebase command without a -- delimiter to indicate the end of options, so the branch name is interpreted as the --exec flag.

Sources

2 independent publishers whose own reporting we read for this story.

  1. rapid7.com

    2 articles · August 27, 2026

    Authenticated RCE via Argument Injection in Gogs (NOT FIXED)
  2. runzero.com

    1 article · August 27, 2026

    Gogs RCE vulnerability: How to find impacted assets

Share your take

Let Clarity write the post for you.

Signed-in readers get a short post drafted on this story in the register they choose — narrative, analytical, or a direct position — editable to the last word before it goes anywhere. The share buttons at the top of this story work without an account.

Topics and entities

Follow any of these and your For You feed starts watching them — no settings page required.

Entities

Loading related stories