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 package | Versions | Reported by |
|---|---|---|
| net/http | before 1.24.8, from 1.25.0 before 1.25.2 | CVE List |
| stdlib (Go) | before 1.24.8, from 1.25.0 before 1.25.2 | Go Vulnerability Database |
| golang (Bitnami) | before 1.24.8, from 1.25.0 before 1.25.2 | Bitnami Vulnerability Database |
All scores
| CISA-ADP | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| Bitnami Vulnerability Database | medium rating |
Classification
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-58186 changed 2025-11-04 | CVE Terms of Use |
| Go Vulnerability Database | GO-2025-4012 changed 2026-05-15 | CC-BY-4.0 |
| NVD | CVE-2025-58186 changed 2026-10-11 | Public domain |
| Bitnami Vulnerability Database | BIT-GOLANG-2025-58186 changed 2025-11-06 | Apache-2.0 |