---
id: CVE-2025-58186
title: >-
  Despite HTTP headers having a default limit of 1MB, the number of cookies that
  can be parsed does not have a limit
summary: >-
  Despite HTTP headers having a default limit of 1MB, the number of cookies that
  can be parsed does not have a limit. By sending a lot of very small cookies
  such as "a=;", an attacker can make an HTTP server allocate a large amount of
  stru…
severity: medium
cvss: 5.3
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'
published: '2025-10-29'
updated: '2026-10-11'
sourceUpdated: '2026-10-11T20:10:00.200'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2025-58186'
references:
  - url: 'https://go.dev/cl/709855'
    label: security@golang.org
  - url: 'https://go.dev/issue/75672'
    label: security@golang.org
  - url: 'https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI'
    label: security@golang.org
  - url: 'https://pkg.go.dev/vuln/GO-2025-4012'
    label: security@golang.org
  - url: 'http://www.openwall.com/lists/oss-security/2025/10/08/1'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
epss: 0.00565
epssPercentile: 0.45287
ingestedAt: '2026-10-12T14:50:34.027Z'
---

## Overview

Despite HTTP headers having a default limit of 1MB, the number of cookies that can be parsed does not have a limit. By sending a lot of very small cookies such as "a=;", an attacker can make an HTTP server allocate a large amount of structs, causing large memory consumption.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
