GITEA.DEV · CVE-2026-123065 · Package
FIX → 28.4.0
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.
first public Nov 15, 2026 · 2 sources
Check it with your coding agent
It reads this page and tells you if your code or app is affected.
Any Gitea instance from 1.15 through 28.3.0 where users have release write permission in at least one repository. Instances that only allow read access or that are on 28.4.0 or later are not affected.
Not affected if fixed-version, read-only-users
Who cares git-hosting, gitea, self-hosted
gitea --version or the admin dashboard; versions from >= 1.15 up to 28.3.0 are affected.Upgrade to 28.4.0
28.4.0.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.
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.
routers/web/repo/release.go:605-617 collects raw keys without validation: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):])
}
}
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.Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
InfraStack checks it against your stack and answers on your report, with the evidence and the fix.
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")
}
services/release/release.go:350-358 deletes from storage using the raw request list, not the authorized set:for _, uuid := range delAttachmentUUIDs {
if err := storage.Attachments.Delete(repo_model.AttachmentRelativePath(uuid)); err != nil {
models/repo/attachment.go:56-58 performs no length or format validation: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.
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 assistance used for vulnerability discovery, analysis, and drafting. Findings verified by human review against the cited source tree and live instance behavior.
NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.