CVE-2025-58186

published 29 Oct 2025 · updated 16 Nov 2026

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

5.3MediumCVSS 5.3EPSS 1%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 1%. Fixed in 1.24.8 and 1.25.2.

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

Vendors, products and packages with version ranges

VendorProductVersionsFixed
Go standard library<1.24.8, >=1.25.0 <1.25.21.24.8, 1.25.2

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2025-58186 severity on Zeptric[![CVE-2025-58186](https://zeptric.io/badge/cve/CVE-2025-58186.svg)](https://zeptric.io/cve/CVE-2025-58186)