{"id":"CVE-2025-58186","revision":"1ac4e2790f15404794edf1c2370be10b","records":[{"revision":"1ac4e2790f15404794edf1c2370be10b","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2025-58186","aliases":[],"title":"Lack of limit when parsing cookies can cause memory exhaustion in net/http","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.","state":0,"publishedAt":"2025-10-29T22:10:13.912+00:00","modifiedAt":"2025-11-04T21:13:35.468+00:00","affected":[{"ecosystem":"https://pkg.go.dev","name":"net/http","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"Go standard library\",\n                    \"product\": \"net/http\",\n                    \"collectionURL\": \"https://pkg.go.dev\",\n                    \"packageName\": \"net/http\",\n                    \"versions\": [\n                        {\n                            \"version\": \"0\",\n                            \"lessThan\": \"1.24.8\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"1.25.0\",\n                            \"lessThan\": \"1.25.2\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ],\n                    \"programRoutines\": [\n                        {\n                            \"name\": \"ParseCookie\"\n                        },\n                        {\n                            \"name\": \"readSetCookies\"\n                        },\n                        {\n                            \"name\": \"readCookies\"\n                        },\n                        {\n                            \"name\": \"Client.Do\"\n                        },\n                        {\n                            \"name\": \"Client.Get\"\n                        },\n                        {\n                            \"name\": \"Client.Head\"\n                        },\n                        {\n                            \"name\": \"Client.Post\"\n                        },\n                        {\n                            \"name\": \"Client.PostForm\"\n                        },\n                        {\n                            \"name\": \"Get\"\n                        },\n                        {\n                            \"name\": \"Head\"\n                        },\n                        {\n                            \"name\": \"Post\"\n                        },\n                        {\n                            \"name\": \"PostForm\"\n                        },\n                        {\n                            \"name\": \"Request.Cookie\"\n                        },\n                        {\n                            \"name\": \"Request.Cookies\"\n                        },\n                        {\n                            \"name\": \"Request.CookiesNamed\"\n                        },\n                        {\n                            \"name\": \"Response.Cookies\"\n                        }\n                    ],\n                    \"defaultStatus\": \"unaffected\"\n                }"}],"metrics":[],"references":["https://go.dev/issue/75672","https://go.dev/cl/709855","https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI","https://pkg.go.dev/vuln/GO-2025-4012"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-58186","license":"CVE Program Terms of Use","key":"cve-program:CVE-2025-58186","identifiers":["CVE-2025-58186"]},"retained":false,"historicalAffected":[]}],"coverage":[]}