{"id":"CVE-2025-58186","state":"PUBLISHED","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.","publishedAt":"2025-10-29T22:10:13.912Z","updatedAt":"2025-11-04T21:13:35.468Z","severity":{"score":5.3,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","source":"CISA-ADP"},"assigner":"Go","products":["Go standard library net/http"],"affected":[{"vendor":"Go standard library","product":"net/http","packageName":"net/http","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.24.8","versionType":"semver"},{"version":"1.25.0","status":"affected","lessThan":"1.25.2","versionType":"semver"}],"collectionURL":"https://pkg.go.dev","programRoutines":[{"name":"ParseCookie"},{"name":"readSetCookies"},{"name":"readCookies"},{"name":"Client.Do"},{"name":"Client.Get"},{"name":"Client.Head"},{"name":"Client.Post"},{"name":"Client.PostForm"},{"name":"Get"},{"name":"Head"},{"name":"Post"},{"name":"PostForm"},{"name":"Request.Cookie"},{"name":"Request.Cookies"},{"name":"Request.CookiesNamed"},{"name":"Response.Cookies"}]}],"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","http://www.openwall.com/lists/oss-security/2025/10/08/1"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:39.787Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/58xxx/CVE-2025-58186.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-58186","state":"PUBLISHED","datePublished":"2025-10-29T22:10:13.912Z","dateUpdated":"2025-11-04T21:13:35.468Z","assignerShortName":"Go","assignerOrgId":"1bb62c36-49e3-4200-9d77-64a1400537cc","dateReserved":"2025-08-27T14:50:58.691Z"},"containers":{"cna":{"title":"Lack of limit when parsing cookies can cause memory exhaustion in net/http","descriptions":[{"lang":"en","value":"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":[{"vendor":"Go standard library","product":"net/http","packageName":"net/http","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.24.8","versionType":"semver"},{"version":"1.25.0","status":"affected","lessThan":"1.25.2","versionType":"semver"}],"collectionURL":"https://pkg.go.dev","programRoutines":[{"name":"ParseCookie"},{"name":"readSetCookies"},{"name":"readCookies"},{"name":"Client.Do"},{"name":"Client.Get"},{"name":"Client.Head"},{"name":"Client.Post"},{"name":"Client.PostForm"},{"name":"Get"},{"name":"Head"},{"name":"Post"},{"name":"PostForm"},{"name":"Request.Cookie"},{"name":"Request.Cookies"},{"name":"Request.CookiesNamed"},{"name":"Response.Cookies"}]}],"references":[{"url":"https://go.dev/issue/75672"},{"url":"https://go.dev/cl/709855"},{"url":"https://groups.google.com/g/golang-announce/c/4Emdl2iQ_bI"},{"url":"https://pkg.go.dev/vuln/GO-2025-4012"}],"problemTypes":[{"descriptions":[{"lang":"en","description":"CWE-400: Uncontrolled Resource Consumption"}]}],"providerMetadata":{"shortName":"Go","orgId":"1bb62c36-49e3-4200-9d77-64a1400537cc","dateUpdated":"2025-10-29T22:10:13.912Z"},"credits":[{"lang":"en","value":"jub0bs"}]},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":5.3,"attackVector":"NETWORK","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"LOW","privilegesRequired":"NONE","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2025-10-30T14:24:44.763207Z","id":"CVE-2025-58186","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-10-30T14:24:50.235Z"}},{"title":"CVE Program Container","references":[{"url":"http://www.openwall.com/lists/oss-security/2025/10/08/1"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-04T21:13:35.468Z"}}]}}}