CVE-2026-25779: Gitea: Open Redirect via redirect_to
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 "redirectto" parameter. PoC When a user uses this URL to login: https://gitea.com/user/login?redirectto=/a/../\example.com They would be redirected to example.com upon a successful login to their gitea account.
Published Jun 17, 2026
Affected packages
github.com/go-gitea/gitea
- Ecosystem
- Go
- Affected
- <= 1.25.4
- Fixed in
- 1.26.0
- Check
go list -m github.com/go-gitea/gitea
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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
Credited to quirmz.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-20750
Gitea does not properly validate project ownership in organization project operations
medium5.3Jan 23, 2026CVE-2026-20800
Gitea improperly exposes issue and pull request titles
low2.3Jan 23, 2026CVE-2026-20883
Gitea improperly exposes issue titles and repository names through previously started stopwatches
low2.3Jan 23, 2026CVE-2026-20888
Gitea does not properly verify authorization when canceling scheduled auto-merges via the web interface
medium5.3Jan 23, 2026CVE-2026-20897
Gitea does not properly validate repository ownership when deleting Git LFS locks
medium5.3Jan 23, 2026CVE-2026-20904
Gitea does not properly validate ownership when toggling OpenID URI visibility
medium5.3Jan 23, 2026
