Skip to content

Commit de79da6

Browse files
1 parent 0b91f3c commit de79da6

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-v9vm-r24h-6rqm",
4+
"modified": "2026-03-05T19:29:44Z",
5+
"published": "2026-03-05T19:29:44Z",
6+
"aliases": [
7+
"CVE-2026-26194"
8+
],
9+
"summary": "Gogs: Release tag option injection in release deletion",
10+
"details": "### Summary\n\nThere 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.\n\n### Affected Component\n\n - internal/database/release.go\n `process.ExecDir(..., \"git\", \"tag\", \"-d\", rel.TagName)`\n\n### Details\n\n `rel.TagName` is used as a CLI argument to `git tag -d` without `--` or `--end-of-options`.\n If the tag name begins with `-`, Git parses it as a flag.\n\n The prior mitigation is incomplete. There is path sanitization in place during creation:\n\n - internal/database/release.go\n `r.TagName = strings.TrimLeft(r.TagName, \"-\")`\n\n But it only covers one creation path and does not reliably protect tag deletions, such as tags added through `git push` or ref updates.\n\n**Exploit Conditions**\n1. An attacker can add a tag name that starts with a dash into the repository.\n2. A user with permission to delete releases triggers it through the web UI or API.\n\n### Recommended Fix\n\n1. Add end-of-options in release deletion:\n - `git tag -d -- <tagName>`\n2. It is better to use the safe git-module deletion helper since it handles options properly.\n3. All Git commands should be audited for user input, ensuring that the end-of-options separator is always used.\n\n### Impact\n - Option injection into `git tag -d`\n - Tag/release deletion can fail or behave unexpectedly\n - Operational denial of service in release cleanup workflows\n - Potential release metadata inconsistency",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "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"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Go",
21+
"name": "gogs.io/gogs"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "0.14.2"
32+
}
33+
]
34+
}
35+
],
36+
"database_specific": {
37+
"last_known_affected_version_range": "<= 0.14.1"
38+
}
39+
}
40+
],
41+
"references": [
42+
{
43+
"type": "WEB",
44+
"url": "https://github.com/gogs/gogs/security/advisories/GHSA-v9vm-r24h-6rqm"
45+
},
46+
{
47+
"type": "WEB",
48+
"url": "https://github.com/gogs/gogs/pull/8175"
49+
},
50+
{
51+
"type": "WEB",
52+
"url": "https://github.com/gogs/gogs/commit/a000f0c7a632ada40e6829abdeea525db4c0fc2d"
53+
},
54+
{
55+
"type": "PACKAGE",
56+
"url": "https://github.com/gogs/gogs"
57+
},
58+
{
59+
"type": "WEB",
60+
"url": "https://github.com/gogs/gogs/releases/tag/v0.14.2"
61+
}
62+
],
63+
"database_specific": {
64+
"cwe_ids": [
65+
"CWE-88"
66+
],
67+
"severity": "HIGH",
68+
"github_reviewed": true,
69+
"github_reviewed_at": "2026-03-05T19:29:44Z",
70+
"nvd_published_at": null
71+
}
72+
}

0 commit comments

Comments
 (0)