Gitea: Denial of Service (CPU & Memory Exhaustion) via O(N^2) String Concatenation in Debian Package Upload (CVE-2026-56755)
Gitea before version 1.27.0 contains a denial of service vulnerability in its Debian package registry parser. The vulnerability arises from unbounded decompression of uploaded .deb files, allowing an attacker to craft a compressed payload that expands to consume excessive memory. Additionally, the parser uses inefficient O(N²) string concatenation when processing continuation lines in the Description field, causing high CPU usage and stalling the server. Any authenticated user with write access to the package registry can trigger this denial of service by uploading a malicious package.
AI Analysis
Technical Summary
The vulnerability in Gitea's Debian package registry parser involves two main issues. First, the parser decompresses the control.tar.gz file from an uploaded .deb package without limiting the decompressed data size, enabling a decompression bomb attack that can exhaust server memory by expanding a small compressed payload into a very large uncompressed stream. Second, the parser concatenates continuation lines in the Description field using repeated string addition (+=), which is an O(N²) operation in Go due to string immutability. This causes excessive CPU consumption and garbage collection overhead, leading to service stalls. Both issues can be exploited independently or together by any authenticated user with write permissions to the package registry, resulting in a complete denial of service.
Potential Impact
An attacker with authenticated write access to the Gitea package registry can upload a specially crafted Debian package that causes the server to consume excessive memory and CPU resources during parsing. This leads to denial of service by exhausting server memory (via unbounded decompression) and stalling the CPU (via inefficient string concatenation). The service becomes unresponsive, impacting availability. There is no indication of code execution or data leakage from the provided information.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict write access to the Debian package registry to trusted users only. Monitor for unusually large or suspicious package uploads and consider implementing external resource limits on decompression size and CPU usage if possible. Avoid processing untrusted .deb packages in vulnerable Gitea versions.
Gitea: Denial of Service (CPU & Memory Exhaustion) via O(N^2) String Concatenation in Debian Package Upload (CVE-2026-56755)
Description
Gitea before version 1.27.0 contains a denial of service vulnerability in its Debian package registry parser. The vulnerability arises from unbounded decompression of uploaded .deb files, allowing an attacker to craft a compressed payload that expands to consume excessive memory. Additionally, the parser uses inefficient O(N²) string concatenation when processing continuation lines in the Description field, causing high CPU usage and stalling the server. Any authenticated user with write access to the package registry can trigger this denial of service by uploading a malicious package.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Gitea's Debian package registry parser involves two main issues. First, the parser decompresses the control.tar.gz file from an uploaded .deb package without limiting the decompressed data size, enabling a decompression bomb attack that can exhaust server memory by expanding a small compressed payload into a very large uncompressed stream. Second, the parser concatenates continuation lines in the Description field using repeated string addition (+=), which is an O(N²) operation in Go due to string immutability. This causes excessive CPU consumption and garbage collection overhead, leading to service stalls. Both issues can be exploited independently or together by any authenticated user with write permissions to the package registry, resulting in a complete denial of service.
Potential Impact
An attacker with authenticated write access to the Gitea package registry can upload a specially crafted Debian package that causes the server to consume excessive memory and CPU resources during parsing. This leads to denial of service by exhausting server memory (via unbounded decompression) and stalling the CPU (via inefficient string concatenation). The service becomes unresponsive, impacting availability. There is no indication of code execution or data leakage from the provided information.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict write access to the Debian package registry to trusted users only. Monitor for unusually large or suspicious package uploads and consider implementing external resource limits on decompression size and CPU usage if possible. Avoid processing untrusted .deb packages in vulnerable Gitea versions.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-6hm7-3pwj-22rm
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-56755"]
- Ecosystems
- ["Go"]
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
Threat ID: 6a600abb9c2644c7f8fe2b7d
Added to database: 07/22/2026, 00:11:39 UTC
Last enriched: 07/22/2026, 00:51:51 UTC
Last updated: 07/31/2026, 12:28:12 UTC
Views: 12
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.