Skip to content

← Actionable
High, CVSS 8.7

Gitea: ParseAcceptLanguage quadratic-time DoS via Locale middleware on unauthenticated requests

CVE-2026-58436GHSA-fw57-jgch-pgf3

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (code.gitea.io/gitea 1.27.0), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
8.7 · CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N · score source
EPSS
  • CVE-2026-58436: 0.61% estimated exploitation activity in the next 30 days; percentile 49.23 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary The Locale middleware that runs in front of every unauthenticated request calls golang.org/x/text/language.ParseAcceptLanguage on the raw Accept-Language header without imposing a size or shape filter. The underlying parser has quadratic-time behaviour on long lists of malformed language tags. The CVE-2022-32149 guard that golang.org/x/text added in v0.3.8 caps the number of - characters in the input at 1000, but it does not cap characters even though the parser's internal scanner aliases to - before parsing. A single unauthenticated GET request with an Accept-Language header built out of separators burns ~2 seconds of server CPU on the host running Gitea; ten concurrent attackers saturate a ten-core box for the duration of the attack while consuming ~1 MiB of upstream bandwidth per request. Affected versions code.gitea.io/gitea 1.22.6 and (per code inspection of main) all earlier and later 1.22.x / 1.23.x / 1.24.x / 1.25.x / 1.26.x versions that do not impose their own size…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-fw57-jgch-pgf3

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-58436

Advisory: Gitea: ParseAcceptLanguage quadratic-time DoS via Locale middleware on unauthenticated requests
IDs: CVE-2026-58436, GHSA-fw57-jgch-pgf3
Record: https://patchnext.com/advisories/cve-2026-58436 (revision 1, source checked 26 Oct 2026, 15:27 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 8.7)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: code.gitea.io/gitea 1.27.0. A vendor fix does not mean a deployment is fixed.

## Affected components
- Go code.gitea.io/gitea: affected < 1.27.0; fixed in 1.27.0

## Suggested inspection (read-only)
- Go code.gitea.io/gitea: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on code.gitea.io/gitea.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-fw57-jgch-pgf3 (GitHub-reviewed advisory GHSA-fw57-jgch-pgf3 lists affected ranges: Go code.gitea.io/gitea >=0 <1.27.0)

Commands are suggestions: review each one before running it.

Loading voting…