code.gitea.io/gitea

CVE-2026-25714

CVE-2026-25714 is a medium-severity missing authorization vulnerability in code.gitea.io/gitea (go), affecting versions <= 1.26.1. It is fixed in 1.26.2.

Key facts
CVSS score
4.3
Medium
Attack vector
Network
Issuing authority
GitHub Advisory Database
Affected package
code.gitea.io/gitea
Fixed in
1.26.2
Disclosed
2026

Summary

Summary Two related issues in the token public-only scope enforcement introduced by PR #32204 (CVE-2025-68941 fix). A public-only scoped API token can access private organization data. Issue 1: /user/orgs missing checkTokenPublicOnly() routers/api/v1/api.go line 1599: Adjacent route at line 1603 has it: Issue 2: checkTokenPublicOnly switch-case evaluates only first matching category routers/api/v1/api.go lines 253-295. Go switch executes only the first matching case. For routes with categories [User, Organization]: Organization case matches first (line 263) ctx.Org.Organization is nil on user routes, passes ctx.ContextUser.IsOrganization() is false, passes User case (line 273) is never reached User visibility check skipped entirely Steps to Reproduce Create a token with public-only scope (Settings > Applications > check "public only") Call: curl -H "Authorization: token <PUBLICONLYTOKEN>" https://gitea.example.com/api/v1/user/orgs Response includes private and limited-visibility organizations Expected: only public organizations returned. Impact Public-only scoped tokens can enumerate private organizations the token owner belongs to. Violates the token's declared scope constraints. Suggested Fix Add checkTokenPublicOnly() to /user/orgs route at line 1599 Replace switch with loop over all categories so User visibility check is not skipped Version Current main branch, commit 2c2d7e6 (April 3, 2026).

Impact

What is missing authorization?

The application does not perform an authorization check before performing a sensitive operation. Typical impact: unauthorized access to restricted functionality or data.

Severity and exposure

CVE-2026-25714 has a CVSS score of 4.3 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.

A fixed version is available (1.26.2). Upgrading removes the vulnerable code path.

Affected versions

go

  • code.gitea.io/gitea (<= 1.26.1)

Security releases

  • code.gitea.io/gitea → 1.26.2 (go)
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's runtime-powered SCA identifies whether CVE-2026-25714 is reachable in your applications. Explore open-source security for your team.

See if CVE-2026-25714 is reachable in your applications. Get a demo

Remediation advice

Upgrade code.gitea.io/gitea to 1.26.2 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about CVE-2026-25714

What is CVE-2026-25714?

CVE-2026-25714 is a medium-severity missing authorization vulnerability in code.gitea.io/gitea (go), affecting versions <= 1.26.1. It is fixed in 1.26.2. The application does not perform an authorization check before performing a sensitive operation.

How severe is CVE-2026-25714?

CVE-2026-25714 has a CVSS score of 4.3 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.

Which versions of code.gitea.io/gitea are affected by CVE-2026-25714?

code.gitea.io/gitea (go) versions <= 1.26.1 is affected.

Is there a fix for CVE-2026-25714?

Yes. CVE-2026-25714 is fixed in 1.26.2. Upgrade to this version or later.

Is CVE-2026-25714 exploitable, and should I be worried?

Whether CVE-2026-25714 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether CVE-2026-25714 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix CVE-2026-25714?

Upgrade code.gitea.io/gitea to 1.26.2 or later.

Stop the waste.
Protect your environment with Kodem.