Vulnerabilities in pkg:golang/github.com/go-gitea/gitea

PACKAGE
Advisory Identifier: GHSA-j5r2-4c8j-xc3m
Advisory Summary

CVE-2026-25779 is a MODERATE open redirect vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Gitea libraries in the Go ecosystem. The issue involves open redirect via redirect_to. Remediation is available by upgrading affected packages to version 1.26.0.

20 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/go-gitea/gitea

20 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/go-gitea/gitea. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-j5r2-4c8j-xc3m CVE-2026-25779 MODERATE Gitea: Open Redirect via redirect_to
GHSA-qqgv-v353-cv8p CVE-2026-20904 MODERATE Gitea does not properly validate ownership when toggling OpenID URI visibility
GHSA-4xx9-vc8v-87hv CVE-2026-20912 MODERATE Gitea does not properly validate repository ownership when linking attachments to releases
GHSA-393c-qgvj-3xph CVE-2026-20897 MODERATE Gitea does not properly validate repository ownership when deleting Git LFS locks
GHSA-9cgq-wp42-4rpq CVE-2026-20888 MODERATE Gitea does not properly verify authorization when canceling scheduled auto-merges via the web interface
GHSA-rw22-5hhq-pfpf CVE-2026-20750 MODERATE Gitea does not properly validate project ownership in organization project operations
GHSA-j8xr-c56q-m8jj CVE-2026-20883 LOW Gitea improperly exposes issue titles and repository names through previously started stopwatches
GHSA-2vgv-hgv4-22mh CVE-2026-20800 LOW Gitea improperly exposes issue and pull request titles
GHSA-r7h7-chh4-5rvm CVE-2020-28991 CRITICAL Improper Access Control in Gitea
GHSA-9f8c-pfvv-p4gm CVE-2021-3382 HIGH Buffer Overflow in gitea
GHSA-q47x-6mqq-4w92 CVE-2019-11228 HIGH Gitea Improper Input Validation
GHSA-f5fj-7265-jxhj CVE-2018-1000803 MODERATE Gitea Exposes Private Email Addresses
GHSA-4wp3-8q92-mh8w CVE-2021-45326 HIGH Cross Site Request Forgery in Gitea
GHSA-hpmr-prr2-cqc4 CVE-2019-11229 HIGH Gitea Remote Code Execution
GHSA-w8xw-7crf-h23x CVE-2022-42968 CRITICAL Gitea vulnerable to Argument Injection
GHSA-r3gq-wxqf-q4gh CVE-2021-45329 MODERATE Cross-site Scripting in Gitea
GHSA-jrpg-35hw-m4p9 CVE-2021-45327 CRITICAL Capture-replay in Gitea
GHSA-36h2-95gj-w488 CVE-2021-45328 MODERATE Open redirect in Gitea
GHSA-8h8p-x289-vvqr CVE-2021-45325 MODERATE Gitea displaying raw OpenID error in UI
GHSA-g2qx-6ghw-67hm CVE-2020-13246 HIGH Denial of Service in Gitea

CVE-2026-25779 at a Glance

CVE Identifier CVE-2026-25779
GHSA Identifier GHSA-j5r2-4c8j-xc3m
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Gitea
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2026-25779

To remediate this vulnerability, upgrade all affected Gitea dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/go-gitea/gitea fixed: 1.26.0
Upgrade github.com/go-gitea/gitea to 1.26.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/go-gitea/gitea

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-25779, inspect your project dependencies for Gitea:

inspect dependencies for github.com/go-gitea/gitea

Analyze the terminal output to locate any version of Gitea in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.26.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Gitea, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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

CVE-2026-25779 Affected Gitea Versions

1 component(s)
Fixed Versions:
1.26.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/go-gitea/gitea
Go
< 1.26.0
1.26.0

References

Frequently Asked Questions

What is CVE-2026-25779?
CVE-2026-25779 is a security vulnerability in Gitea involving Open Redirect via redirect_to under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Gitea versions are affected?
Affected versions include releases prior to 1.26.0 across affected packages: github.com/go-gitea/gitea.
What version fixes CVE-2026-25779?
Upgrading to 1.26.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/go-gitea/gitea affected?
Yes, github.com/go-gitea/gitea is affected in releases prior to 1.26.0. Upgrade your dependency to 1.26.0 or later.
What CWE is associated with CVE-2026-25779?
CVE-2026-25779 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check Go dependencies for CVE-2026-25779?
Run the dependency tree command: 'inspect dependencies for github.com/go-gitea/gitea'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-j5r2-4c8j-xc3m",
  "modified" : "2026-06-17T18:10:46Z",
  "published" : "2026-06-17T18:10:46Z",
  "aliases" : [ "CVE-2026-25779" ],
  "summary" : "Gitea: Open Redirect via redirect_to",
  "details" : "### Details\n\nDespite 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.\n\n### PoC\n\nWhen a user uses this URL to login:\n\n`https://gitea.com/user/login?redirect_to=/a/../\\example.com`\n\nThey would be redirected to `example.com` upon a successful login to their gitea account.\n\n### Impact\n\n* Phishing: Attackers can use trusted domain links to redirect victims to credential-harvesting pages\n* OAuth/SSO Token Theft: In authentication flows, authorization codes or tokens may leak via redirect\n* Referer Leakage: Sensitive URL parameters may be exposed to attacker domains via the Referer header\n* Cache Poisoning: In deployments with shared caches, malicious redirects may be cached and served to other users",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/go-gitea/gitea"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.26.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.25.4"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/go-gitea/gitea/security/advisories/GHSA-j5r2-4c8j-xc3m"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/go-gitea/gitea"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-17T18:10:46Z",
    "nvd_published_at" : null
  }
}