GitHub Advisoryadvisory · Go

GHSA-j5r2-4c8j-xc3m Gitea: Open Redirect via redirect_to

MEDIUM Published 2026-06-17 Modified 2026-06-17 Official page ↗
Aliases
CVE-2026-25779
Ecosystem
Go
Packages
github.com/go-gitea/gitea
Severity
Moderate
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
Weaknesses
CWE-601
Reviewed
2026-06-17

Affected packages

• Go github.com/go-gitea/gitea: < 1.26.0 → fixed in 1.26.0

Description

Details Despite the validation within `urlIsRelative` in `modules/httplib/url.go`, an open redirect is still possible due to usage of directory traversal sequences plus a back-slash in the "redirect_to" parameter. PoC When a user uses this URL to login: `https://gitea.com/user/login?redirect_to=/a/../\example.com` They would be redirected to `example.com` upon a successful login to their gitea account. Impact • Phishing: Attackers can use trusted domain links to redirect victims to credential-harvesting pages • OAuth/SSO Token Theft: In authentication flows, authorization codes or tokens may leak via redirect • Referer Leakage: Sensitive URL parameters may be exposed to attacker domains via the Referer header • Cache Poisoning: In deployments with shared caches, malicious redirects may be cached and served to other users

Related

Alias · CVE (1)

  • CVE-2026-25779 Gitea versions up to and including 1.25.4 allow redirect bypasses through raw or percent-encoded backslashes in redirect_to values. vulnerability

Weakness · CWE (1)

  • CWE-601 URL Redirection to Untrusted Site weakness

References