Open-Source Security Intelligence

Know every vulnerability
before it knows you.

DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.

Search

GHSA-v9vm-r24h-6rqm

HighCVSS 8.8 / 10
Published Mar 5, 2026·Last modified Mar 23, 2026
Affected Components(0)

No affected components available

Description

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
Risk Scores
Base Score
8.8

The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability.

Threat Intelligence
6.7

Exploitation attempts have been detected. Elevated vigilance and prompt remediation are advised.

EPSS
0.51%

The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.

Exploit
Not available

We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.

Browse More

Scan your project

Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.

Checkout DevGuard