{"id":"CVE-2026-26196","aliases":["CVE-2026-26196","GHSA-x9p5-w45c-7ffc","GO-2026-4619"],"related":[],"kind":"vulnerability","state":"published","title":"Gogs: Access tokens get exposed through URL params in API requests","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Gogs: Access tokens get exposed through URL params in API requests in gogs.io/gogs","format":"markdown","source":"go"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-03-05T18:49:19.540Z","modified":"2026-06-17T10:25:55.553Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-598"],"affected":[{"ranges":[{"version":"< 0.14.2","status":"affected"}],"vendor":"gogs","product":"gogs","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"0.13.3"}],"ecosystem":"Go","package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"go"},{"ranges":[{"status":"affected","fixed":"0.14.2"}],"vendor":"gogs","product":"gogs","cpe":"cpe:2.3:a:gogs:gogs:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/gogs/gogs/security/advisories/GHSA-x9p5-w45c-7ffc","tags":["advisory","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gogs/gogs/pull/8177","tags":["issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gogs/gogs/commit/295bfba72993c372e7b338438947d8e1a6bed8fd","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gogs/gogs/releases/tag/v0.14.2","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-26196","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/gogs/gogs","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-03-06T18:07:57.384Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-26196","url":"https://www.cve.org/CVERecord?id=CVE-2026-26196","licence":"CVE Terms of Use","modified":"2026-03-06T18:08:07.473Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x9p5-w45c-7ffc","url":"https://github.com/advisories/GHSA-x9p5-w45c-7ffc","licence":"CC-BY-4.0","modified":"2026-03-23T04:56:01.681Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-4619","url":"https://pkg.go.dev/vuln/GO-2026-4619","licence":"CC-BY-4.0","modified":"2026-03-23T04:52:46.965Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-26196","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-26196","licence":"Public domain","modified":"2026-06-17T10:25:55.553Z"}],"updatedAt":"2026-11-25T22:59:15.323Z","epss":{"score":0.00302,"percentile":0.24706,"date":"2026-12-01T12:00:22.000Z"}}