Skip to content

Commit a8de3b0

Browse files
1 parent b1ec9ce commit a8de3b0

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-x9p5-w45c-7ffc",
4+
"modified": "2026-03-05T19:50:35Z",
5+
"published": "2026-03-05T19:50:35Z",
6+
"aliases": [
7+
"CVE-2026-26196"
8+
],
9+
"summary": "Gogs: Access tokens get exposed through URL params in API requests",
10+
"details": "### Summary\n\nThe Gogs API still accepts tokens in URL parameters such as `token` and `access_token`, which can leak through logs, browser history, and referrers.\n\n### Details\n\nA static review shows that the API still checks tokens in the URL query before looking at headers:\n\n - internal/context/auth.go reads `c.Query(\"token\")`\n - internal/context/auth.go falls back to `c.Query(\"access_token\")`\n - internal/context/auth.go only checks the `Authorization` header when the query token is empty\n - internal/context/auth.go authenticates using that token and marks the request as token-authenticated\n\nToken-authenticated requests are accepted by API routes through `c.IsTokenAuth` checks:\n - internal/route/api/v1/api.go\n\n### Impact\n\nIf tokens are sent in URLs such as `/api/v1/user?token=...`, they can leak in logs, browser or shell history, and referrer headers, and can be reused until revoked.\n\n### Recommended Fix\n\n- Authentication headers should be used exclusively for token transmission.\n- Token parameters should be blocked at the proxy or WAF level.\n- Query strings should be scrubbed from logs.\n- A strict referrer policy should be set.\n\n### Remediation\n\nA fix is available at https://github.com/gogs/gogs/releases/tag/v0.14.2.",
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:N/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+
"last_affected": "0.13.3"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/gogs/gogs/security/advisories/GHSA-x9p5-w45c-7ffc"
42+
},
43+
{
44+
"type": "WEB",
45+
"url": "https://github.com/gogs/gogs/pull/8177"
46+
},
47+
{
48+
"type": "WEB",
49+
"url": "https://github.com/gogs/gogs/commit/295bfba72993c372e7b338438947d8e1a6bed8fd"
50+
},
51+
{
52+
"type": "PACKAGE",
53+
"url": "https://github.com/gogs/gogs"
54+
},
55+
{
56+
"type": "WEB",
57+
"url": "https://github.com/gogs/gogs/releases/tag/v0.14.2"
58+
}
59+
],
60+
"database_specific": {
61+
"cwe_ids": [
62+
"CWE-598"
63+
],
64+
"severity": "MODERATE",
65+
"github_reviewed": true,
66+
"github_reviewed_at": "2026-03-05T19:50:35Z",
67+
"nvd_published_at": null
68+
}
69+
}

0 commit comments

Comments
 (0)