Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Gitea: Denial of Service via Unbounded io.ReadAll in NPM Package Tag Endpoint (CVE-2026-42931)

0
Medium
Published: 07/21/2026 (07/21/2026, 20:39:37 UTC)
Source: GCVE Database
Product: code.gitea.io/gitea

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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Affected software

Goghsa
code.gitea.io/gitea
Affected versions
<1.27.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/22/2026, 00:49:41 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses