Incorrect Authorization Affecting code.gitea.io/gitea/models package, versions >=1.22.3 <1.26.2


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.25% (17th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Incorrect Authorization vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-CODEGITEAIOGITEAMODELS-17430895
  • published23 Jun 2026
  • disclosed17 Jun 2026
  • creditKamil Sawicki

Introduced: 17 Jun 2026

CVE-2026-24791  (opens in a new tab)
CWE-863  (opens in a new tab)

How to fix?

Upgrade code.gitea.io/gitea/models to version 1.26.2 or higher.

Overview

code.gitea.io/gitea/models is a self-hosted git service.

Affected versions of this package are vulnerable to Incorrect Authorization in the handling of token scope restrictions in the /api/v1/user route group. An attacker can gain unauthorized access to or modify private account resources by using a token or OAuth grant marked as public-only, but with the required read or write scope, to interact with self routes that do not enforce the public-only restriction. This allows actions such as adding SSH keys, creating OAuth applications, managing Actions secrets and variables, registering runners, and creating or listing private repositories, which should be restricted to private resources.

CVSS Base Scores

version 4.0
version 3.1