GHSA-v9vm-r24h-6rqm

Suggest an improvement
Source
https://github.com/advisories/GHSA-v9vm-r24h-6rqm
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-v9vm-r24h-6rqm/GHSA-v9vm-r24h-6rqm.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-v9vm-r24h-6rqm
Aliases
Published
2026-03-05T19:29:44Z
Modified
2026-03-12T02:11:19Z
Severity
  • 8.8 (High) CVSS_V4 - 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 CVSS Calculator
Summary
Gogs: Release tag option injection in release deletion
Details

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
Database specific
{
    "cwe_ids": [
        "CWE-88"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-05T19:29:44Z",
    "nvd_published_at": "2026-03-05T19:16:03Z",
    "severity": "HIGH"
}
References

Affected packages

Go / gogs.io/gogs

Package

Name
gogs.io/gogs
View open source insights on deps.dev
Purl
pkg:golang/gogs.io/gogs

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.14.2

Database specific

last_known_affected_version_range
"<= 0.14.1"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-v9vm-r24h-6rqm/GHSA-v9vm-r24h-6rqm.json"