What’s Vulnerable › Vulnerabilities
CVE-2025-58186: Lack of limit when parsing cookies can cause memory exhaustion in net/http
- Severity: medium (CVSS 5.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.6% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-10-29 · updated 2026-10-11
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 products
- Go standard library net/http: before 1.24.8; from 1.25.0 before 1.25.2 — fixed in 1.24.8, 1.25.2
How to fix
Upgrade to a fixed version: Go standard library net/http 1.24.8, 1.25.2. Check the vendor advisory for mitigations.
References
- https://go.dev/cl/709855
- https://go.dev/issue/75672
- https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI
- https://pkg.go.dev/vuln/GO-2025-4012
- http://www.openwall.com/lists/oss-security/2025/10/08/1
Get alerted when CVE-2025-58186 or the next vulnerability affects your stack