CVE-2026-26196: Gogs: Access tokens get exposed through URL params in API requests

Published Mar 5, 2026
·
Updated

Summary

The Gogs API still accepts tokens in URL parameters such as token and accesstoken, 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("accesstoken") - internal/context/auth.go only checks the Authorization header 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.

Other sources

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 accesstoken, which can leak through logs, browser history, and referrers. This issue has been patched in version 0.14.2.

MITRE

Affected Software

3 affected components
gogs<0.14.2
go/gogs.io/gogs<=0.13.3
Gogs Gogs<0.14.2

Event History

Mar 5, 2026
CVE Published
via MITRE·06:49 PM
Data Sourced
via MITRE·06:49 PM
DescriptionWeakness
Data Sourced
via NVD·07:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·07:50 PM
Data Sourced
via GitHub·07:50 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-26196?

CVE-2026-26196 is classified as a moderate severity vulnerability due to the potential exposure of access tokens.

2

How do I fix CVE-2026-26196?

To mitigate CVE-2026-26196, avoid using access tokens in the URL parameters and implement authentication headers instead.

3

What software versions are affected by CVE-2026-26196?

CVE-2026-26196 affects Gogs versions up to 0.14.2 and Go package versions up to 0.13.3.

4

What consequences can arise from CVE-2026-26196?

CVE-2026-26196 can lead to unauthorized access if access tokens are logged or exposed through browser history.

5

Is there a workaround for CVE-2026-26196?

A temporary workaround for CVE-2026-26196 is to avoid passing access tokens as URL parameters in API requests.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203