# CVE-2026-22547: Gitea improper input validation in repository creation fields

Source: https://junglewise.ai/threats/cve-2026-22547-gitea-improper-input-validation-in-repository-creation-fields  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-03. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-22547 · Severity: critical · CVSS 9.1 · Published 2026-07-03

Gitea is a self-hosted Git service platform used by organizations to manage code repositories. The vulnerability allows unauthenticated attackers to bypass input validation when creating repositories, submitting maliciously crafted field values that lack proper length and format checks. This can result in unauthorized repository modifications, data corruption, or exposure of sensitive repository metadata.

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

## Quick answers

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

**How severe is CVE-2026-22547?** Critical severity, with a CVSS score of 9.1, published 3 July 2026.

**Which products and versions are affected?** Gitea < 1.25.5; code.gitea.io/gitea (Go) < 1.25.5, SEMVER:introduced=0,fixed=1.25.5.

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

**How is CVE-2026-22547 attacked?** It is attacked over the network, in a hosted service.

**Am I affected by CVE-2026-22547?** Check whether you run Gitea or code.gitea.io/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.25.5 or later

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


## Technical details

The vulnerability is an improper input validation flaw (CWE-20) in Gitea's repository creation API and web form handlers. Affected fields include template-related parameters with length constraints and enumeration-type fields such as trust model and object format. The missing validation allows attackers to send oversized strings or invalid enum values via network requests without authentication or user interaction. Successful exploitation could lead to repository state corruption, unauthorized access to protected repositories, or service degradation. The issue was patched in version 1.25.5 by adding comprehensive validation constraints to both the API option struct and web form struct, enforcing maximum length limits and valid enum values.

## Affected products

- Gitea Gitea < 1.25.5

## Identifiers

- CVE-2026-22547
- GHSA-922f-hfwp-p56f
- GO-2026-6338

## Timeline

- 2026-07-03: disclosed: Vulnerability published to GitHub Advisory Database
- 2026-03-16: patched: Fix released in Gitea 1.25.5

## References

- [https://github.com/go-gitea/gitea/pull/36671](https://github.com/go-gitea/gitea/pull/36671)
- [https://github.com/go-gitea/gitea/pull/36757](https://github.com/go-gitea/gitea/pull/36757)
- [https://blog.gitea.com/release-of-1.25.5](https://blog.gitea.com/release-of-1.25.5)
- [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/commit/569c49debe06f30a2bbb50b3812e705c556b8adf](https://github.com/go-gitea/gitea/commit/569c49debe06f30a2bbb50b3812e705c556b8adf)

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