{"id":"CVE-2026-26196","aliases":["GHSA-x9p5-w45c-7ffc","GO-2026-4619"],"url":"https://o3.security/vulnerability/CVE-2026-26196","summary":"Gogs: Access tokens get exposed through URL params in API requests","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.","published":"2026-03-05T18:49:19.540Z","modified":"2026-08-12T03:51:38.242698860Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"gogs.io/gogs","fixedVersion":null}],"fix":{"url":"https://github.com/gogs/gogs/commit/295bfba72993c372e7b338438947d8e1a6bed8fd","label":"gogs/gogs@295bfba"},"references":[{"type":"WEB","url":"https://github.com/gogs/gogs/releases/tag/v0.14.2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/26xxx/CVE-2026-26196.json"},{"type":"ADVISORY","url":"https://github.com/gogs/gogs/security/advisories/GHSA-x9p5-w45c-7ffc"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-26196"},{"type":"FIX","url":"https://github.com/gogs/gogs/commit/295bfba72993c372e7b338438947d8e1a6bed8fd"},{"type":"FIX","url":"https://github.com/gogs/gogs/pull/8177"},{"type":"PACKAGE","url":"https://github.com/gogs/gogs"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:38.242698860Z"}}