Vulnerability DatabaseCVE-2026-129341

CVE-2026-129341: 
Gitea vulnerability analysis and mitigation

Overview

CVE-2026-129341 is an Incorrect Authorization vulnerability in Gitea's attachment deletion endpoint (DeleteAttachment) that allows a former write-access collaborator to permanently delete release assets they originally uploaded, even after their write permissions have been revoked. The flaw affects Gitea versions 1.11.0 through 28.3.x (inclusive) and is fixed in version 28.4.0. It was discovered by the Anthropic OSS scanner (finding ANT-2026-WQYTZO7W) and disclosed on November 15, 2026. The CVSS v3.1 base score is 5.4 (Medium) (GitHub Advisory, Feedly).

Technical details

The root cause is CWE-863 (Incorrect Authorization): the DeleteAttachment web handler in routers/web/repo/attachment.go skips all permission checks when the requesting user matches the attachment's UploaderID, relying on a shortcut introduced in commit 8c909820a9fd (v1.11.0, 2019). This shortcut was intended for removing unsubmitted draft uploads but was never scoped to that use case. The handler is registered at both /{owner}/{repo}/issues/attachments/remove and /pulls/attachments/remove, which require only read access to issues or pull requests — far less than the CanWrite(unit.TypeReleases) check applied to non-uploaders. An attacker who knows the attachment UUID (returned by the release API in the uuid field) can POST to the issues route and delete the asset's database row and stored file, causing the download link to return 404 for all users. The API route and the release-specific route are not affected because they enforce write permissions independently (GitHub Advisory, Fix PR #40120).

Impact

A dismissed collaborator, removed team member, or release-bot account whose Releases write access has been revoked can permanently delete any release asset they originally uploaded by sending a single authenticated POST request. Both the database record and the stored file are removed, breaking download links for all users and requiring the repository owner to re-upload assets from their own copy. The attacker cannot add or replace assets, cannot access assets uploaded by others, and gains no read access beyond what they already have; on public repositories the attack is possible as long as the attacker's account exists, while fully removed collaborators on private repositories are locked out (GitHub Advisory).

Exploitability

No public proof-of-concept exploit code or in-the-wild exploitation has been reported. The EPSS score is approximately 0.162%, indicating low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. Exploitation requires a valid authenticated session (low privilege), knowledge of the target attachment's UUID (obtainable via the release API), and the attacker must have previously uploaded the targeted asset while holding write access (Feedly, GitHub Advisory).

Exploitation steps

  1. Prerequisite: The attacker (e.g., "mallory") must have previously uploaded a release asset to a repository (e.g., alice/app) while holding Releases write access, and must have since had that access revoked or reduced to read-only.
  2. Obtain the attachment UUID: Query the Gitea release API as an authenticated user: GET /api/v1/repos/alice/app/releases/1/assets — the response includes the uuid field for each asset, including those uploaded by the attacker.
  3. Confirm standard routes are blocked: Verify that DELETE /api/v1/repos/alice/app/releases/1/assets/1 returns HTTP 403, and POST /alice/app/releases/attachments/remove returns HTTP 404, confirming write access has been revoked.
  4. Exploit the issues route: Send an authenticated POST request to the under-protected endpoint: POST /alice/app/issues/attachments/remove with the form body file=<UUID>. The handler matches Doer.ID == UploaderID, skips all permission checks, and returns HTTP 200 with the attachment UUID.
  5. Confirm deletion: The release asset is now absent from the release listing, and GET /alice/app/releases/download/v1.0/app.bin returns HTTP 404 for all users (GitHub Advisory).

Indicators of compromise

  • Network: Unexpected authenticated POST requests to /{owner}/{repo}/issues/attachments/remove or /{owner}/{repo}/pulls/attachments/remove from accounts that no longer hold write access to the repository.
  • Logs: Gitea access logs showing HTTP 200 responses to /issues/attachments/remove or /pulls/attachments/remove for users who are not current write collaborators; subsequent HTTP 404 responses to release asset download URLs that were previously accessible.
  • File System: Missing files under the Gitea data/attachments/ directory corresponding to release assets that were not intentionally removed by a repository owner or maintainer.
  • Database: Attachment rows deleted from the attachments table where release_id > 0 and the deleting user's current repository permission is read-only (GitHub Advisory).

Mitigation and workarounds

Upgrade Gitea to version 28.4.0 or later, which contains the fix backported via PR #40268 into the release/v28 branch. The patch restructures the DeleteAttachment handler so that release-linked attachments always require current CanWrite(unit.TypeReleases) permission regardless of uploader identity; only unlinked (pending/draft) uploads retain the uploader shortcut. No configuration-based workaround is available for versions prior to 28.4.0 — upgrading is the only remediation (Gitea Release v28.4.0, Fix PR #40268, Gitea Blog).

Community reactions

The vulnerability was reported by the Anthropic OSS scanner and credited to contributor silverwind, who also authored the fix. The Gitea maintainer team reviewed and merged the fix within approximately one week of the initial pull request. The NixOS security tracker opened a tracking issue (NixOS/nixpkgs#591251) to update the Gitea package to 28.4.0. Community reaction has been routine for a moderate-severity authorization bypass, with no significant media coverage or notable researcher commentary beyond the standard advisory and patch review process (GitHub Advisory, Fix PR #40120).

Additional resources


Source: This report was generated using AI

Related Gitea vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-8r27-mm5g-38wwHIGH7.5
  • Gitea logoGitea
  • docker-scout-cli-plugin
NoNoDec 01, 2026
CVE-2026-140009HIGH7.5
  • JavaScript logoJavaScript
  • homepage-2
NoYesNov 30, 2026
CVE-2026-73504MEDIUM5.5
  • Java logoJava
  • flyway-fips
NoYesNov 18, 2026
CVE-2026-129525MEDIUM5.4
  • Gitea logoGitea
  • gitea
NoYesNov 15, 2026
CVE-2026-129341MEDIUM5.4
  • Gitea logoGitea
  • cpe:2.3:a:gitea:gitea
NoYesNov 15, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management