8.8high
Gogs: Release tag option injection in release deletion
- Severity
- 8.8high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.52% (higher than 45% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-v9vm-r24h-6rqmGO-2026-4617
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| gogs gogs | < 0.14.2, before 0.14.2 | CVE List, NVD |
| gogs.io/gogs (Go) | before 0.14.2, all versions | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 8.8high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N |
| NVD | 7.3high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
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
Go Vulnerability Database
Gogs: Release tag option injection in release deletion in gogs.io/gogs.
NOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.
(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)
The additional affected modules and versions are: gogs.io/gogs before v0.14.2.
NVD (es)
Gogs es un servicio Git autoalojado de código abierto. Antes de la versión 0.14.2, existe un problema de seguridad en Gogs donde la eliminación de una versión puede fallar si un nombre de etiqueta controlado por el usuario se pasa a Git sin el separador correcto, lo que permite que se inyecten opciones de Git y alteren el proceso. Este problema ha sido parcheado en la versión 0.14.2.
References
| https://github.com/gogs/gogs/security/advisories/GHSA-v9vm-r24h-6rqm | advisory, exploit, mitigation, vendor-advisory, web | |
| https://github.com/gogs/gogs/pull/8175 | issue-tracking, web | |
| https://github.com/gogs/gogs/commit/a000f0c7a632ada40e6829abdeea525db4c0fc2d | patch, web | |
| https://github.com/gogs/gogs/releases/tag/v0.14.2 | release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-26194 | advisory | |
| https://github.com/gogs/gogs | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-26194 changed 2026-03-06 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-v9vm-r24h-6rqm changed 2026-03-23 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4617 changed 2026-03-23 | CC-BY-4.0 |
| NVD | CVE-2026-26194 changed 2026-06-17 | Public domain |