/

CVE-2026-105267

Severity:

HIGH RISK

(8.1)

Improper Authorization (CWE-863) in Gitea Tag Deletion

CVE-2026-105267

Analyzed

Vulnerability type

Category:

Improper Authorization

CWE:

CWE-732, CWE-863

Impact:

Unauthorized permanent deletion of releases and attachments

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Gitea's tag-deletion route could allow a user with Code write access to delete published releases and their attachments, even without permission to manage releases. The issue becomes risky when the route processes a release tag through a handler that does not verify the target is only a plain tag, although protected-tag rules may still prevent deletion.

Gitea's tag-deletion route could allow a user with Code write access to delete published releases and their attachments, even without permission to manage releases. The issue becomes risky when the route processes a release tag through a handler that does not verify the target is only a plain tag, although protected-tag rules may still prevent deletion.

Affected context

The vulnerability occurs in Gitea repositories where:

  • A collaborator has write access to the Code unit
  • The collaborator does not have Releases write access
  • The tag-deletion web route is used against a tag associated with a published release
  • The shared deletion handler does not distinguish plain tags from release tags

Protected tag rules covering the target release tag may provide an additional control that blocks the operation.

The vulnerability occurs in Gitea repositories where:

  • A collaborator has write access to the Code unit
  • The collaborator does not have Releases write access
  • The tag-deletion web route is used against a tag associated with a published release
  • The shared deletion handler does not distinguish plain tags from release tags

Protected tag rules covering the target release tag may provide an additional control that blocks the operation.

Exploit preconditions

  • Attack surface: Gitea's authenticated web route for deleting tags
  • Required access: Code write permission on the affected repository, without requiring Releases write permission
  • Trigger point: A tag-deletion request targeting a tag associated with a published release
  • Why exploitation is possible: Authorization is evaluated for tag deletion, while the shared handler can also perform release deletion without separately checking release-management permissions
  • Attack surface: Gitea's authenticated web route for deleting tags
  • Required access: Code write permission on the affected repository, without requiring Releases write permission
  • Trigger point: A tag-deletion request targeting a tag associated with a published release
  • Why exploitation is possible: Authorization is evaluated for tag deletion, while the shared handler can also perform release deletion without separately checking release-management permissions

Why this happens

The underlying flaw is an authorization boundary failure. A handler shared by tag and release deletion treated permission to delete a code tag as sufficient for operations that could also remove a published release and its attachments.

This behavior maps primarily to CWE-863: Incorrect Authorization, because the application did not enforce the authorization required for the specific protected action. It is also related to CWE-732: Incorrect Permission Assignment for Critical Resource, because repository permissions permitted a lower-privileged collaborator to affect release resources.

The underlying flaw is an authorization boundary failure. A handler shared by tag and release deletion treated permission to delete a code tag as sufficient for operations that could also remove a published release and its attachments.

This behavior maps primarily to CWE-863: Incorrect Authorization, because the application did not enforce the authorization required for the specific protected action. It is also related to CWE-732: Incorrect Permission Assignment for Critical Resource, because repository permissions permitted a lower-privileged collaborator to affect release resources.

Potential impact

  • An authorized collaborator may permanently delete published releases
  • Release attachments may be removed
  • Consumers may lose access to expected release artifacts
  • Release history and distribution workflows could be disrupted
  • The incident could cause integrity, availability, or auditability concerns for repository content
  • An authorized collaborator may permanently delete published releases
  • Release attachments may be removed
  • Consumers may lose access to expected release artifacts
  • Release history and distribution workflows could be disrupted
  • The incident could cause integrity, availability, or auditability concerns for repository content

General mitigation guidance

Mitigation generally focuses on enforcing authorization for the final operation rather than relying on the permission associated with the initial route.

Common defensive patterns include:

  • Separating tag-deletion and release-deletion authorization checks
  • Verifying that the target is a plain tag before allowing tag-only behavior
  • Requiring explicit Releases write permission for release and attachment deletion
  • Applying object-level authorization checks immediately before destructive operations
  • Preserving protected-tag enforcement as an independent safeguard
  • Using least-privilege repository roles and limiting write access to trusted collaborators
  • Providing confirmation, audit logging, and recovery controls for destructive repository actions

Mitigation generally focuses on enforcing authorization for the final operation rather than relying on the permission associated with the initial route.

Common defensive patterns include:

  • Separating tag-deletion and release-deletion authorization checks
  • Verifying that the target is a plain tag before allowing tag-only behavior
  • Requiring explicit Releases write permission for release and attachment deletion
  • Applying object-level authorization checks immediately before destructive operations
  • Preserving protected-tag enforcement as an independent safeguard
  • Using least-privilege repository roles and limiting write access to trusted collaborators
  • Providing confirmation, audit logging, and recovery controls for destructive repository actions

How teams detect issues like this

Organizations can assess for this class of issue through:

  • Static analysis that identifies shared destructive handlers with inconsistent permission checks
  • Code review checks comparing route-level permissions with object-level authorization
  • Tests that exercise each repository role against tag, release, and attachment deletion separately
  • Policy enforcement requiring explicit authorization for destructive operations on release artifacts
  • Audit-log monitoring for release deletion performed by identities lacking release-management privileges
  • Automated security review tools that flag missing resource-type validation or authorization checks

Organizations can assess for this class of issue through:

  • Static analysis that identifies shared destructive handlers with inconsistent permission checks
  • Code review checks comparing route-level permissions with object-level authorization
  • Tests that exercise each repository role against tag, release, and attachment deletion separately
  • Policy enforcement requiring explicit authorization for destructive operations on release artifacts
  • Audit-log monitoring for release deletion performed by identities lacking release-management privileges
  • Automated security review tools that flag missing resource-type validation or authorization checks

Sources

SourceLink
blog.gitea.comblog.gitea.com/release-of-28.1.0/
github.comgithub.com/go-gitea/gitea/pull/39501
github.comgithub.com/go-gitea/gitea/pull/39507
github.comgithub.com/go-gitea/gitea/releases/tag/v28.1.0
github.comgithub.com/go-gitea/gitea/security/advisories/GHSA-vvqw-mjq8-x248

Frequently asked

questions

A collaborator with Code write access could potentially trigger the affected behavior, even if that collaborator lacked Releases write access. The exact exposure depends on repository permissions and whether the target tag is protected.

No. It requires authenticated repository access with sufficient Code write permission, and protected-tag rules may block deletion for covered tags.

Enforce authorization for the specific resource and operation being performed. Release deletion should require release-management permission independently of tag-deletion permission.

Test every destructive endpoint across role boundaries, validate the target resource type, keep authorization checks close to the operation, and monitor audit logs for unexpected privileged actions.

A collaborator with Code write access could potentially trigger the affected behavior, even if that collaborator lacked Releases write access. The exact exposure depends on repository permissions and whether the target tag is protected.

No. It requires authenticated repository access with sufficient Code write permission, and protected-tag rules may block deletion for covered tags.

Enforce authorization for the specific resource and operation being performed. Release deletion should require release-management permission independently of tag-deletion permission.

Test every destructive endpoint across role boundaries, validate the target resource type, keep authorization checks close to the operation, and monitor audit logs for unexpected privileged actions.

Find out what's already
exploitable in your codebase.