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.
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 1. An attacker can add a tag name that starts with a dash into the repository. 2. A user with permission to delete releases triggers it through the web UI or API.
Recommended Fix
1. Add end-of-options in release deletion: - git tag -d -- <tagName> 2. It is better to use the safe git-module deletion helper since it handles options properly. 3. 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
Other sources
Gogs is an open source self-hosted Git service. Prior to version 0.14.2, there's 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, this lets git options get injected and mess with the process. This issue has been patched in version 0.14.2.
— MITRE
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-26194?
CVE-2026-26194 has been classified as a medium severity vulnerability.
How do I fix CVE-2026-26194?
To fix CVE-2026-26194, update Gogs to version 0.14.3 or later.
Who is affected by CVE-2026-26194?
Gogs versions up to and including 0.14.2 are affected by CVE-2026-26194.
What type of vulnerability is CVE-2026-26194?
CVE-2026-26194 is an injection vulnerability related to the release deletion process in Gogs.
What can an attacker do with CVE-2026-26194?
An attacker could potentially exploit CVE-2026-26194 to interfere with the release deletion process by injecting options through user-controlled tag names.