The Gogs API still accepts tokens in URL parameters such as token and access_token, which can leak through logs, browser history, and referrers.
A static review shows that the API still checks tokens in the URL query before looking at headers:
c.Query("token")c.Query("access_token")Authorization header when the query token is emptyToken-authenticated requests are accepted by API routes through c.IsTokenAuth checks:
- internal/route/api/v1/api.go
If 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.
A fix is available at https://github.com/gogs/gogs/releases/tag/v0.14.2.
{
"github_reviewed": true,
"nvd_published_at": "2026-03-05T19:16:04Z",
"github_reviewed_at": "2026-03-05T19:50:35Z",
"cwe_ids": [
"CWE-598"
],
"severity": "MODERATE"
}