---
id: "CVE-2026-123065"
page: "https://infrastack.ai/live/CVE-2026-123065"
kind: "vulnerability"
aliases: ["CVE-2026-123065", "GHSA-4p89-xcq8-xfhm"]
title: "Cross-repository attachment file deletion and denial of service via release edit traversal"
severity: "high"
cvss: 8.5
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "gitea.dev", "fixed": ["28.4.0"], "affected": ">= 1.15, <= 28.3.0", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["cwe-22", "cwe-639", "git-hosting", "gitea", "package", "self-hosted"]
not_affected_if: ["fixed-version", "read-only-users"]
published_at: "2026-11-15T21:03:04+00:00"
first_seen_at: "2026-11-15T21:12:48+00:00"
updated_at: "2026-11-15T21:14:01+00:00"
sources: [{"source": "ghsa-repo", "url": "https://github.com/go-gitea/gitea/security/advisories/GHSA-4p89-xcq8-xfhm", "first_seen_at": "2026-11-15T21:12:48+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-123065", "first_seen_at": "2026-11-15T22:40:23+00:00"}]
exploit_sources: []
---

# Cross-repository attachment file deletion and denial of service via release edit traversal

Link for people: https://infrastack.ai/live/CVE-2026-123065 (this .md is for agents)

The release edit form passes unvalidated attachment UUIDs straight to storage deletion, so a traversal string can point at files belonging to other repositories. An authenticated user with release write permission can delete those files and leave database rows behind, causing HTTP 500 errors on later access.

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

## Affected

- go:gitea.dev affected >= 1.15, <= 28.3.0 fixed 28.4.0

## How to check

- Check the Gitea version with `gitea --version` or the admin dashboard; versions from `>= 1.15` up to `28.3.0` are affected.
- Confirm the instance is self-hosted or otherwise under your control, since only instances running an affected version are exposed.

## Fix

- Upgrade Gitea to `28.4.0`.

## Timeline

- 2026-11-15T21:12:48+00:00 ghsa-repo https://github.com/go-gitea/gitea/security/advisories/GHSA-4p89-xcq8-xfhm
- 2026-11-15T22:40:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-123065

## Documents

- [advisory] Maintainer's advisory: github.com https://github.com/go-gitea/gitea/security/advisories/GHSA-4p89-xcq8-xfhm
- [fix] Release notes: github.com https://github.com/go-gitea/gitea/releases/tag/v28.4.0

## From the sources

### Summary

The release edit endpoint deletes attachment files from storage using raw request parameters. Database authorization uses resolved records. Storage deletion uses unresolved input. An authenticated user with release write permission in any repository can delete arbitrary attachment files instance-wide by submitting a traversal UUID, and can cause HTTP 500 with a short UUID. Database rows are retained, causing subsequent download failures.

### Details

Release attachment deletion is intended to be scoped to the release being edited. The edit form submits `attachment-del-<uuid>=true` entries. Only UUIDs attached to the edited release should result in file deletion.

1. `routers/web/repo/release.go:605-617` collects raw keys without validation:

```go
const delPrefix = "attachment-del-"
for k, v := range ctx.Repo.Form {
  if strings.HasPrefix(k, delPrefix) && v[0] == "true" {
    delAttachmentUUIDs = append(delAttachmentUUIDs, k[len(delPrefix):])
  }
}
```

2. `services/release/release.go:295-311` resolves UUIDs and enforces `ReleaseID` ownership. Traversal strings match no database row and therefore pass this check. Direct foreign UUIDs fail closed at this stage.

```go
attachments, err := repo_model.GetAttachmentsByUUIDs(ctx, delAttachmentUUIDs)
for _, attach := range attachments {
  if attach.ReleaseID != rel.ID {
    return util.NewPermissionDeniedErrorf("delete attachment of release permission denied")
  }
```

3. `services/release/release.go:350-358` deletes from storage using the raw request list, not the authorized set:

```go
for _, uuid := range delAttachmentUUIDs {
  if err := storage.Attachments.Delete(repo_model.AttachmentRelativePath(uuid)); err != nil {
```

4. `models/repo/attachment.go:56-58` performs no length or format validation:

```go
func AttachmentRelativePath(uuid string) string {
  return path.Join(uuid[0:1], uuid[1:2], uuid)
}
```

Input `a` panics at `uuid[1:2]`. Input `../../../8/f/<victim-uuid>` normalizes through `path.Join` and `modules/storage/local.go:61-62` (`FilePathJoinAbs`) to the victim path `8/f/<victim-uuid>` within the shared attachment store. `FilePathJoinAbs` (`modules/util/path.go:95-123`) prevents escape above the storage root but permits movement within it.

Expected: only UUIDs resolved to the edited release are deleted from storage. Unknown values are ignored.
Actual: any submitted string is converted to a storage path and deleted. Traversal values resolve to other repositories files.

### Impact

Authenticated users with release write permission in any repository can delete arbitrary attachment or release asset files when the target UUID is known. UUIDs are exposed through pages, APIs, and download URLs. Deletion is persistent at the storage layer while database rows remain, producing HTTP 500 on subsequent access. Short inputs cause request failure without persistent damage.

### LLM usage

LLM assistance used for vulnerability discovery, analysis, and drafting. Findings verified by human review against the cited source tree and live instance behavior.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
