Lack of limit when parsing cookies can cause memory exhaustion in net/http
Summary
| CVE | CVE-2025-58186 |
|---|---|
| State | PUBLISHED |
| Assigner | Go |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2025-10-29 23:16:19 UTC |
| Updated | 2026-10-11 20:10:00 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 5.3 MEDIUM from ADP
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Problem Types: CWE-400: Uncontrolled Resource Consumption
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | ADP | DECLARED | 5.3 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| 3.1 | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | Secondary | 5.3 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
NoneScope
UnchangedConfidentiality
NoneIntegrity
NoneAvailability
LowCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Go Standard Library | Net/http | affected 1.24.8 semver | Not specified |
| CNA | Go Standard Library | Net/http | affected 1.25.0 1.25.2 semver | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| www.openwall.com/lists/oss-security/2025/10/08/1 | af854a3a-2127-422b-91ae-364da2661108 | www.openwall.com | |
| go.dev/issue/75672 | [email protected] | go.dev | |
| groups.google.com/g/golang-announce/c/4Emdl2iQ_bI | [email protected] | groups.google.com | |
| pkg.go.dev/vuln/GO-2025-4012 | [email protected] | pkg.go.dev | |
| go.dev/cl/709855 | [email protected] | go.dev | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: jub0bs (en)
There are currently no legacy QID mappings associated with this CVE.