---
id: "CVE-2025-68939"
kind: "vulnerability"
aliases: ["CVE-2025-68939", "GHSA-263q-5cv3-xq9g"]
title: "Gitea allows attackers to add attachments with forbidden file extensions"
severity: "high"
cvss: 8.2
epss: 0.00332
exploited: false
status: "open"
category: "package"
products: [{"name": "code.gitea.io/gitea", "fixed": ["1.23.0-rc0"], "affected": "< 1.23.0-rc0", "ecosystem": "go"}, {"name": "gitea", "fixed": ["1.23.0"], "affected": "< 1.23.0", "ecosystem": "vendor"}]
ecosystems: ["go", "vendor"]
tags: ["cwe-424", "gitea", "package", "self-hosted"]
not_affected_if: ["gitea-1.23.0-or-later"]
published_at: "2025-12-26T03:15:50+00:00"
first_seen_at: "2026-11-03T16:25:28+00:00"
updated_at: "2026-11-03T16:51:48+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-263q-5cv3-xq9g", "first_seen_at": "2026-11-03T16:25:28+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-68939", "first_seen_at": "2026-11-03T16:51:48+00:00"}]
---

# Gitea allows attackers to add attachments with forbidden file extensions

Gitea before 1.23.0 lets an attacker rename an attachment through the attachment API so it carries a file extension the server normally forbids. The sources do not say what an attacker can do with such a file once it is stored.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- go:code.gitea.io/gitea affected < 1.23.0-rc0 fixed 1.23.0-rc0
- vendor:gitea affected < 1.23.0 fixed 1.23.0

## How to check

- Check the running Gitea version with `gitea --version` or the server's admin dashboard.
- Confirm whether `1.23.0-rc0` or later is installed.

## Fix

- Gitea: `1.23.0-rc0`

## Timeline

- 2026-11-03T16:25:28+00:00 ghsa https://github.com/advisories/GHSA-263q-5cv3-xq9g
- 2026-11-03T16:51:48+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2025-68939

## Documents

- [fix] Patch: github.com https://github.com/go-gitea/gitea/pull/32151
- [fix] Release: github.com https://github.com/go-gitea/gitea/releases/tag/v1.23.0
- [fix] Patch: github.com https://github.com/go-gitea/gitea/commit/7adc4717ec8e4f8fe678010866e936cf024f498d
- [fix] Release notes: blog.gitea.com https://blog.gitea.com/release-of-1.23.0/

## From the sources

Gitea before 1.23.0 allows attackers to add attachments with forbidden file extensions by editing an attachment name via an attachment API.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
