CVE-2026-82402 Gogs: Open Redirect in /redirect endpoint via backslash bypass in `IsSameSite`
An unauthenticated attacker can redirect users to external sites via a backslash bypass in the /redirect endpoint, facilitating phishing attacks.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2026-82402?
CVE-2026-82402 is a medium-severity vulnerability in gogs, published on 14 Oct 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-601
Which versions are affected by CVE-2026-82402?
How do I fix CVE-2026-82402?
No fix has been published for CVE-2026-82402 yet. Limit exposure of the affected software until one is available.
Is CVE-2026-82402 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-82402 exists.
Sources
Also known as GHSA-3g28-2vwg-gxq6.