CVE-2026-26194: Gogs: Release tag option injection in release deletion
Summary There is a security issue in Gogs where deleting a release can fail if a user-controlled tag name is passed to Git without the right separator, allowing Git option injection and therefore interfering with the process.
Published Mar 5, 2026
Affected packages
gogs.io/gogs
- Ecosystem
- Go
- Affected
- <= 0.14.1
- Fixed in
- 0.14.2
- Check
go list -m gogs.io/gogs
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
There is a security issue in Gogs where deleting a release can fail if a user-controlled tag name is passed to Git without the right separator, allowing Git option injection and therefore interfering with the process.
Affected Component
- internal/database/release.go
process.ExecDir(..., "git", "tag", "-d", rel.TagName)
Details
rel.TagName is used as a CLI argument to git tag -d without -- or --end-of-options. If the tag name begins with -, Git parses it as a flag.
The prior mitigation is incomplete. There is path sanitization in place during creation:
- internal/database/release.go
r.TagName = strings.TrimLeft(r.TagName, "-")
But it only covers one creation path and does not reliably protect tag deletions, such as tags added through git push or ref updates.
Exploit Conditions
- An attacker can add a tag name that starts with a dash into the repository.
- A user with permission to delete releases triggers it through the web UI or API.
Recommended Fix
- Add end-of-options in release deletion:
git tag -d -- <tagName>- It is better to use the safe git-module deletion helper since it handles options properly.
- All Git commands should be audited for user input, ensuring that the end-of-options separator is always used.
Impact
- Option injection into
git tag -d - Tag/release deletion can fail or behave unexpectedly
- Operational denial of service in release cleanup workflows
- Potential release metadata inconsistency
Credited to rezmoss.
References
- https://github.com/gogs/gogs/security/advisories/GHSA-v9vm-r24h-6rqm
- https://github.com/gogs/gogs/pull/8175
- https://github.com/gogs/gogs/commit/a000f0c7a632ada40e6829abdeea525db4c0fc2d
- https://github.com/gogs/gogs/releases/tag/v0.14.2
- https://nvd.nist.gov/vuln/detail/CVE-2026-26194
- https://github.com/advisories/GHSA-v9vm-r24h-6rqm
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-52800
Gogs Vulnerable to CSRF Leading to Organization Owner Takeover
high8.8Jun 23, 2026CVE-2026-52801
Gogs has the ability to import local repositories via Mirror Settings
high8.1Jun 23, 2026CVE-2026-52802
Gogs has an Open Redirect via redirect_to
medium5.4Jun 23, 2026CVE-2026-52804
Gogs Vulnerable to Privilege Escalation via Collaboration Access Mode Validation
medium5.5Jun 23, 2026CVE-2026-52805
Gogs has a Migration Redirect Bypass that Leads to Internal Repository Theft
high8.7Jun 23, 2026CVE-2026-52806
Gogs vulnerable to RCE via git rebase --exec argument injection in pull request merge
critical9.9Jun 23, 2026
