---
id: CVE-2026-20897
title: >-
  Gitea does not properly validate repository ownership when deleting Git LFS
  locks
summary: >-
  Gitea does not properly validate repository ownership when deleting Git LFS
  locks. A user with write access to one repository may be able to delete LFS
  locks belonging to other repositories.
severity: critical
cvss: 9.1
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'
cwe:
  - CWE-284
  - CWE-639
  - CWE-639
vendor: gitea
product: gitea
affected:
  - gitea < 1.25.4
patched:
  - gitea 1.25.4
published: '2026-01-22'
updated: '2026-06-27'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-20897'
references:
  - url: 'https://blog.gitea.com/release-of-1.25.4/'
    label: 88ee5874-cf24-4952-aea0-31affedb7ff2
  - url: 'https://github.com/go-gitea/gitea/pull/36344'
    label: 88ee5874-cf24-4952-aea0-31affedb7ff2
  - url: 'https://github.com/go-gitea/gitea/pull/36349'
    label: 88ee5874-cf24-4952-aea0-31affedb7ff2
  - url: 'https://github.com/go-gitea/gitea/releases/tag/v1.25.4'
    label: 88ee5874-cf24-4952-aea0-31affedb7ff2
  - url: 'https://github.com/go-gitea/gitea/security/advisories/GHSA-rrq5-r9h5-pc7c'
    label: 88ee5874-cf24-4952-aea0-31affedb7ff2
  - url: 'https://access.redhat.com/security/cve/CVE-2026-20897'
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2432204'
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-20897.json
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
tags:
  - nvd
epss: 0.00462
epssPercentile: 0.37293
ingestedAt: '2026-06-29T13:24:34.631Z'
---

## Overview

Gitea does not properly validate repository ownership when deleting Git LFS locks. A user with write access to one repository may be able to delete LFS locks belonging to other repositories.

## Affected

- `gitea < 1.25.4`

## Remediation

Upgrade past the affected range:

- `gitea 1.25.4`
