Gitea: Denial of Service via Unbounded io.ReadAll in NPM Package Tag Endpoint (CVE-2026-42931)
Gitea contains a denial of service vulnerability in its NPM package tag API endpoint due to an unbounded io.ReadAll call that reads the entire HTTP request body into memory without size limits. Authenticated users with write access to their package namespace can send a single large request to cause an out-of-memory crash of the Gitea server process. This results in a persistent denial of service that can survive automatic restarts. The vulnerability affects versions prior to 1.27.0. No server-side size limits apply to this endpoint, and no patch information is currently available.
AI Analysis
Technical Summary
The vulnerability (CVE-2026-42931) in Gitea's NPM package tag API endpoint arises from the use of io.ReadAll(ctx.Req.Body) without any size validation, allowing an authenticated user to send an arbitrarily large HTTP request body. This causes the Go runtime to attempt to allocate excessive memory, leading to an out-of-memory runtime panic that kills the entire Gitea process. The endpoint requires write access to the user's own package namespace but does not require the package to exist. Existing package size limits are not enforced on this endpoint, and the memory-buffering protections used elsewhere in Gitea are bypassed. The issue affects all Gitea versions before 1.27.0. No official patch or fix is currently documented.
Potential Impact
Successful exploitation results in a denial of service condition by crashing the Gitea server process due to out-of-memory errors. This can be triggered by a single large HTTP request to the NPM package tag endpoint by any authenticated user with write access to their package namespace. The denial of service is persistent and can survive automatic server restarts, impacting availability of the Gitea service.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, administrators should consider restricting access to the NPM package tag API endpoint to trusted users only or implementing external request size limits at the network or proxy level to prevent large request bodies. Monitoring for unusual request sizes targeting this endpoint may also help detect exploitation attempts.
Gitea: Denial of Service via Unbounded io.ReadAll in NPM Package Tag Endpoint (CVE-2026-42931)
Description
Gitea contains a denial of service vulnerability in its NPM package tag API endpoint due to an unbounded io.ReadAll call that reads the entire HTTP request body into memory without size limits. Authenticated users with write access to their package namespace can send a single large request to cause an out-of-memory crash of the Gitea server process. This results in a persistent denial of service that can survive automatic restarts. The vulnerability affects versions prior to 1.27.0. No server-side size limits apply to this endpoint, and no patch information is currently available.
CVSS v3.1
Score 6.5medium
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 (CVE-2026-42931) in Gitea's NPM package tag API endpoint arises from the use of io.ReadAll(ctx.Req.Body) without any size validation, allowing an authenticated user to send an arbitrarily large HTTP request body. This causes the Go runtime to attempt to allocate excessive memory, leading to an out-of-memory runtime panic that kills the entire Gitea process. The endpoint requires write access to the user's own package namespace but does not require the package to exist. Existing package size limits are not enforced on this endpoint, and the memory-buffering protections used elsewhere in Gitea are bypassed. The issue affects all Gitea versions before 1.27.0. No official patch or fix is currently documented.
Potential Impact
Successful exploitation results in a denial of service condition by crashing the Gitea server process due to out-of-memory errors. This can be triggered by a single large HTTP request to the NPM package tag endpoint by any authenticated user with write access to their package namespace. The denial of service is persistent and can survive automatic server restarts, impacting availability of the Gitea service.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, administrators should consider restricting access to the NPM package tag API endpoint to trusted users only or implementing external request size limits at the network or proxy level to prevent large request bodies. Monitoring for unusual request sizes targeting this endpoint may also help detect exploitation attempts.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-wwqq-x6w4-frm2
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-42931"]
- Ecosystems
- ["Go"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a600ab79c2644c7f8fe24e9
Added to database: 07/22/2026, 00:11:35 UTC
Last enriched: 07/22/2026, 00:49:41 UTC
Last updated: 07/31/2026, 12:28:12 UTC
Views: 11
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.