GHSA-9mq6-mqjj-c2c5: Gitea: Unbounded Arch package file metadata can cause resource amplification in Gitea package uploads
Summary
Hello Gitea Security Team,
Thank you for your continued work on Gitea. I would like to responsibly report a potential availability-impact issue that I observed in Gitea’s Arch package registry implementation.
During local testing, I noticed that Gitea records non-dot regular file entries from an uploaded Arch package archive into package file metadata. I could not identify an explicit limit on the number of recorded file entries or on the cumulative size of recorded file names before this metadata is serialized, stored, and later used during repository index generation.
As a result, a relatively small compressed .pkg.tar.gz archive may lead to significantly larger server-side metadata processing and storage. I tested this only against a local self-hosted Gitea instance and have not tested this against any third-party or production service.
Suggested Severity
Suggested severity: Medium
Suggested CVSS 3.1 vector:
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
Suggested CVSS score: 4.3
This assessment is only a suggestion. The issue appears to require an authenticated user with package publishing permission. However, once that condition is met, the behavior is reachable over the network, does not require user interaction, and may affect availability through amplified metadata parsing, serialization, database storage, and repository index generation.
Affected Component
- Gitea package registry
- Arch package upload endpoint
- Arch package metadata parsing
- Arch repository index generation
Technical Details
The upload flow appears to accept an Arch package archive, parse its contents, record file entries into package metadata, and later reuse that metadata when generating the Arch repository index.
The relevant flow appears to include:
- routers/api/packages/arch/arch.go:46 accepts the upload stream.
- routers/api/packages/arch/arch.go:55 copies the upload into a HashedBuffer.
- routers/api/packages/arch/arch.go:62 parses the archive with arch_modu
Details
Original advisory: https://github.com/advisories/GHSA-9mq6-mqjj-c2c5
Referenced CVEs
| CVE | CSIRTS overview | External |
|---|---|---|
| CVE-2026-59763 | coverage & exploitation status | NVD · CVE.org |
Same CVEs, other sources
How other CERTs, PSIRTs and databases cover the vulnerabilities in this advisory.
- high[NEW] [high] Gitea: Multiple vulnerabilitiescert-bund
More from GitHub Security Advisories
- mediumGHSA-jr6p-8pjj-mfx6: Capsule has an incomplete fix of CVE-2026-22872: TenantResource RawItems and Generators s…2026-07-31
- mediumGHSA-68cj-mvg9-rgm2: Capsule: CapsuleConfiguration NodeMetadata regex fields lack webhook validation, allowing…2026-07-31
- mediumGHSA-ff84-5f28-78qj: re2: Out-of-bounds heap read in `exec`/`test`/`match` via attacker-influenced `lastIndex`…2026-07-31
- mediumGHSA-6hxr-mr5r-9836: re2: Global `String.prototype.match` with an empty-matchable pattern never advances → inf…2026-07-31
- mediumGHSA-x83g-979r-f5fh: Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII2026-07-31