Summary
Gogs: Release tag option injection in release deletion
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.
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
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
- 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.
Frequently Asked Questions
- What is CVE-2026-26194? CVE-2026-26194 is a high-severity security vulnerability in gogs.io/gogs (go), affecting versions <= 0.14.1. It is fixed in 0.14.2.
- Which versions of gogs.io/gogs are affected by CVE-2026-26194? gogs.io/gogs (go) versions <= 0.14.1 is affected.
- Is there a fix for CVE-2026-26194? Yes. CVE-2026-26194 is fixed in 0.14.2. Upgrade to this version or later.
- Is CVE-2026-26194 exploitable, and should I be worried? Whether CVE-2026-26194 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-26194 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-26194? Upgrade
gogs.io/gogsto 0.14.2 or later.