CVE-2026-82402: Gogs: Open Redirect in /redirect endpoint via backslash bypass in `IsSameSite`

Published Oct 14, 2026
·
Updated

Gogs is an open source self-hosted Git service. Prior to 0.15.0+dev, an unauthenticated attacker can provide a backslash-containing target to the /redirect endpoint, and similar post-action redirect flows are also affected. internal/urlx/urlx.go IsSameSite validates a normalized form of the target while cmd/gogs/internal/web/web.go getRedirect and other callers use the original value in the Location response. This backslash normalization mismatch lets browsers interpret the Location value as a scheme-relative external URL, allowing links on a trusted Gogs domain to redirect victims to attacker-controlled content for phishing. This vulnerability is fixed in 0.15.0+dev.

Affected Software

1 affected component
Gogs Gogs<0.15.0+dev

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Gogs to a version that resolves this vulnerability.

    Fixed in 0.15.0+dev

Event History

Oct 14, 2026
CVE Published
via MITRE·06:49 PM
Data Sourced
via MITRE·06:49 PM
DescriptionWeakness

Frequently Asked Questions

1

Who can exploit this issue?

An unauthenticated attacker can exploit the affected redirect endpoint and similar post-action redirect flows by supplying a target containing backslashes. Exploitation does not require an account on the Gogs instance.

2

What is the practical impact of exploitation?

Attackers can create links on a trusted Gogs domain that browsers interpret as redirects to attacker-controlled external content. This can support phishing by making the initial link appear to point to a legitimate Gogs instance.

3

Which versions are affected and what version fixes it?

Gogs versions prior to 0.15.0+dev are affected. The issue is fixed in 0.15.0+dev.

4

How can I identify potentially affected redirect handling?

Review requests to the /redirect endpoint and similar post-action flows for redirect target values containing backslashes. Those values may pass same-site validation but be returned in a Location header that browsers interpret as an external scheme-relative URL.

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