# CVE-2026-25779: Gitea open redirect via backslash-encoded paths in redirect_to parameter

Source: https://junglewise.ai/threats/cve-2026-25779-gitea-open-redirect-via-backslash-encoded-paths-in-redirect-to  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-03. Updated: 2026-07-03  
License: CC BY 4.0 with a link back

CVE-2026-25779 · Severity: medium · CVSS 4 · Published 2026-07-03

Gitea, an open-source Git service, is vulnerable to an open redirect flaw. Attackers can craft malicious links that appear to stay within the trusted Gitea domain but instead redirect users to external, potentially harmful websites. This technique is commonly used in phishing campaigns to trick users into providing credentials or downloading malware on a site they believe is legitimate.

Technologies: [Gitea](https://junglewise.ai/threats/technologies/gitea), [code.gitea.io/gitea (Go)](https://junglewise.ai/threats/technologies/code-gitea-io-gitea), [github.com/go-gitea/gitea (Go)](https://junglewise.ai/threats/technologies/github-com-go-gitea-gitea). Vendors: [Gitea](https://junglewise.ai/threats/vendors/gitea), [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2026-25779 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-25779 being exploited in the wild.

**How severe is CVE-2026-25779?** Medium severity, with a CVSS score of 4, published 3 July 2026.

**Which products and versions are affected?** Gitea <= 1.25.4; code.gitea.io/gitea (Go) SEMVER:introduced=0,fixed=1.26.0; github.com/go-gitea/gitea (Go) <= 1.25.4, SEMVER:introduced=0,fixed=1.26.0.

**Is there a fix for CVE-2026-25779?** Yes. code.gitea.io/gitea (Go): upgrade to 1.26.0 or later; github.com/go-gitea/gitea (Go): upgrade to 1.26.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-25779 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-25779?** Check whether you run Gitea, code.gitea.io/gitea (Go) or github.com/go-gitea/gitea (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- code.gitea.io/gitea (Go): upgrade to 1.26.0 or later

  ```sh
  go get code.gitea.io/gitea@v1.26.0
  ```

- github.com/go-gitea/gitea (Go): upgrade to 1.26.0 or later

  ```sh
  go get github.com/go-gitea/gitea@v1.26.0
  ```


## Technical details

An open redirect vulnerability (CWE-601) exists in Gitea's URL validation logic within the 'redirect_to' parameter. The application failed to properly sanitize or reject raw backslashes ('\') or percent-encoded backslashes ('%5c'). Because many modern web browsers and URL normalizers treat backslashes as path separators, an attacker can use them to construct scheme-relative URLs (e.g., '/a/../\example.com'). This bypasses relative path checks and forces the browser to redirect to an external domain. The issue is resolved in Gitea version 1.25.5 by tightening relative URL validation to reject these characters.

## Affected products

- Gitea Gitea Open Source Git Server <= 1.25.4

## Identifiers

- CVE-2026-25779
- GHSA-j5r2-4c8j-xc3m
- GO-2026-5448

## Timeline

- 2026-02-17: other: Initial pull request submitted to fix the issue
- 2026-03-13: patched: Gitea version 1.25.5 released
- 2026-07-03: advisory: CVE-2026-25779 published

## References

- [https://blog.gitea.com/release-of-1.25.5/](https://blog.gitea.com/release-of-1.25.5/)
- [https://github.com/go-gitea/gitea/pull/36660](https://github.com/go-gitea/gitea/pull/36660)
- [https://github.com/go-gitea/gitea/pull/36716](https://github.com/go-gitea/gitea/pull/36716)
- [https://github.com/go-gitea/gitea/releases/tag/v1.25.5](https://github.com/go-gitea/gitea/releases/tag/v1.25.5)
- [https://github.com/go-gitea/gitea/security/advisories/GHSA-j5r2-4c8j-xc3m](https://github.com/go-gitea/gitea/security/advisories/GHSA-j5r2-4c8j-xc3m)

## Related threats

- [Gitea account takeover via OAuth2 auto-linking](https://junglewise.ai/threats/cve-2026-120263-when-oauth2-client-account-linking-is-set-to-auto-not-the)
- [Gitea limited-visibility profile disclosure via public-only token](https://junglewise.ai/threats/cve-2026-119627-the-web-profile-and-rss-atom-feed-routes-of-users-and)
- [Gitea token scope bypass in web routes](https://junglewise.ai/threats/cve-2026-119625-the-username-web-route-accepted-personal-access-tokens-over-http)
- [Gitea project boards information disclosure of private pull requests](https://junglewise.ai/threats/cve-2026-119533-repository-and-organization-project-boards-listed-the-pull)
- [Gitea API token scope bypass in repository deletion](https://junglewise.ai/threats/cve-2026-119441-delete-api-v1-orgs-org-repos-deletes-all-repositories-of-an)
