6.9medium
Gogs: Access tokens get exposed through URL params in API requests
- Severity
- 6.9medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.30% (higher than 24% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-x9p5-w45c-7ffcGO-2026-4619
Description
Gogs is an open source self-hosted Git service. Prior to version 0.14.2, gogs api still accepts tokens in url params like token and access_token, which can leak through logs, browser history, and referrers. This issue has been patched in version 0.14.2.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| gogs gogs | < 0.14.2, before 0.14.2 | CVE List, NVD |
| gogs.io/gogs (Go) | up to 0.13.3, all versions | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 6.9medium CVSS:4.0 | 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 |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| GitHub | medium CVSS:4.0 | 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 |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
Gogs is an open source self-hosted Git service. Prior to version 0.14.2, gogs api still accepts tokens in url params like token and access_token, which can leak through logs, browser history, and referrers. This issue has been patched in version 0.14.2.
GitHub Advisory Database
Summary
The Gogs API still accepts tokens in URL parameters such as token and access_token, which can leak through logs, browser history, and referrers.
Details
A static review shows that the API still checks tokens in the URL query before looking at headers:
- internal/context/auth.go reads
c.Query("token") - internal/context/auth.go falls back to
c.Query("access_token") - internal/context/auth.go only checks the
Authorizationheader when the query token is empty - internal/context/auth.go authenticates using that token and marks the request as token-authenticated
Token-authenticated requests are accepted by API routes through c.IsTokenAuth checks:
- internal/route/api/v1/api.go
Impact
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.
Recommended Fix
- Authentication headers should be used exclusively for token transmission.
- Token parameters should be blocked at the proxy or WAF level.
- Query strings should be scrubbed from logs.
- A strict referrer policy should be set.
Remediation
A fix is available at https://github.com/gogs/gogs/releases/tag/v0.14.2.
Go Vulnerability Database
Gogs: Access tokens get exposed through URL params in API requests in gogs.io/gogs
NVD (es)
Gogs es un servicio Git autoalojado de código abierto. Antes de la versión 0.14.2, la API de Gogs aún aceptaba tokens en parámetros de URL como 'token' y 'access_token', los cuales pueden filtrarse a través de registros, el historial del navegador y referentes. Este problema ha sido parcheado en la versión 0.14.2.
References
| https://github.com/gogs/gogs/security/advisories/GHSA-x9p5-w45c-7ffc | advisory, mitigation, vendor-advisory, web | |
| https://github.com/gogs/gogs/pull/8177 | issue-tracking, web | |
| https://github.com/gogs/gogs/commit/295bfba72993c372e7b338438947d8e1a6bed8fd | patch, web | |
| https://github.com/gogs/gogs/releases/tag/v0.14.2 | release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-26196 | advisory | |
| https://github.com/gogs/gogs | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-26196 changed 2026-03-06 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-x9p5-w45c-7ffc changed 2026-03-23 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4619 changed 2026-03-23 | CC-BY-4.0 |
| NVD | CVE-2026-26196 changed 2026-06-17 | Public domain |