CVE-2026-26194
JSON

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 packageVersionsReported by
gogs gogs< 0.14.2, before 0.14.2CVE List, NVD
gogs.io/gogs (Go)before 0.14.2, all versionsGitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M8.8high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
NVD7.3high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H

Classification

CWE-88

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

  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
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

Sources

SourceRecordLicence
CVE ListCVE-2026-26194 changed 2026-03-06CVE Terms of Use
GitHub Advisory DatabaseGHSA-v9vm-r24h-6rqm changed 2026-03-23CC-BY-4.0
Go Vulnerability DatabaseGO-2026-4617 changed 2026-03-23CC-BY-4.0
NVDCVE-2026-26194 changed 2026-06-17Public domain