CVE-2025-58186
JSON

5.3medium

Lack of limit when parsing cookies can cause memory exhaustion in net/http

Severity
5.3medium CVSS:3.1 by CISA-ADP
Exploit likelihood
0.56% (higher than 48% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Go
Also known as
GO-2025-4012BIT-GOLANG-2025-58186

Description

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.

Affected

Product or packageVersionsReported by
net/httpbefore 1.24.8, from 1.25.0 before 1.25.2CVE List
stdlib (Go)before 1.24.8, from 1.25.0 before 1.25.2Go Vulnerability Database
golang (Bitnami)before 1.24.8, from 1.25.0 before 1.25.2Bitnami Vulnerability Database

All scores

CISA-ADP5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Bitnami Vulnerability Databasemedium rating

Classification

CWE-400

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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.

NVD (es)

A pesar de que los encabezados HTTP tienen un límite predeterminado de 1MB, el número de cookies que se pueden analizar no tiene un límite. Al enviar una gran cantidad de cookies muy pequeñas, como 'a=;', un atacante puede hacer que un servidor HTTP asigne una gran cantidad de estructuras, lo que provoca un gran consumo de memoria.

References

Related

Sources

SourceRecordLicence
CVE ListCVE-2025-58186 changed 2025-11-04CVE Terms of Use
Go Vulnerability DatabaseGO-2025-4012 changed 2026-05-15CC-BY-4.0
NVDCVE-2025-58186 changed 2026-10-11Public domain
Bitnami Vulnerability DatabaseBIT-GOLANG-2025-58186 changed 2025-11-06Apache-2.0