# CVE-2025-58186: Lack of limit when parsing cookies can cause memory exhaustion in net/http

> An attacker can cause memory exhaustion in Go HTTP servers by sending numerous small cookies, leading to denial of service.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 29 Oct 2025
- **Updated:** 4 Nov 2025
- **Also known as:** AZL-69140, AZL-69254, AZL-78911, AZL-98670, BELL-CVE-2025-58186, BIT-golang-2025-58186, CLEANSTART-2026-AZ82176, CLEANSTART-2026-MD34208, CLEANSTART-2026-NZ83550, DEBIAN-CVE-2025-58186, ECHO-5d63-3b88-e70a, GHSA-rjcg-56ph-3qvg, GO-2025-4012, MINI-23fp-rx3r-5f7w, MINI-247f-wq98-q89p, MINI-258c-qq64-9pf7, MINI-2757-jfg9-qwv6, MINI-28fr-54cp-88wc, MINI-28gc-fmgc-jmxv, MINI-29mm-5jj4-43h3, MINI-2gqg-vh6v-qwmh, MINI-2jp9-xhm9-866g, MINI-2pmh-wjxc-fpc2, MINI-2wg4-88pp-388r, MINI-2x85-f552-9665, MINI-2xfj-9q6q-285m, MINI-3528-mxvj-q5pj, MINI-365c-mr4w-986r, MINI-36wg-qwx6-rf9g, MINI-38vx-vxpr-x763, MINI-39cj-4p5j-8wvj, MINI-39wr-g6x6-jcj4, MINI-3c5w-69vv-7v86, MINI-3h8f-247v-rvmc, MINI-3m2m-x2wh-gwm5, MINI-3mcj-89m9-6j3p, MINI-3mh9-68pm-9x7f, MINI-3p9g-9q82-39r8, MINI-3r5q-x2h4-hpvx, MINI-3rg2-qpcg-36rp, MINI-3xrp-x63x-p9p9, MINI-436f-9mrr-7798, MINI-456f-vc2m-m3g2, MINI-46g8-fv4w-jwr4, MINI-47gc-gh2r-5q8g, MINI-49qr-2c2p-33ff, MINI-49rg-c4hm-56jv, MINI-4c36-3qv6-8j7f, MINI-4f8p-fgjr-2qgc, MINI-4frj-48q8-22rv, MINI-4fvw-898x-w9rg, MINI-4grp-q285-cgfc, MINI-4h2w-vwwx-cwq2, MINI-4qpx-jfwm-78pg, MINI-4r6x-6f67-cwqw, MINI-4v3x-6w4c-pc6x, MINI-4w3q-pmpm-vpm3, MINI-4wgg-hv93-fv9r, MINI-5473-x2m6-v8vr, MINI-55m3-wmxv-vvcr, MINI-57f9-f4qr-gwjq, MINI-582x-53rc-cxmp, MINI-5837-ghg8-fhmj, MINI-587h-rfr8-mcff, MINI-5c24-m5qx-67fc, MINI-5cvm-52w6-6c6w, MINI-5frf-rhh9-gcg7, MINI-5fw9-6mff-frp8, MINI-5p9f-7fvp-rcwp, MINI-5vhw-8968-pfvh, MINI-5wjh-6wcr-3grw, MINI-5x4v-mgqm-2892, MINI-5xmx-82wm-rfgh, MINI-62gv-hmjq-8267, MINI-662j-586h-87f4, MINI-6cww-pfw7-44j4, MINI-6fwr-qqfj-46rm, MINI-6gw8-p66c-3wc7, MINI-6jq8-5cwm-23mw, MINI-6mfp-7w5m-422w, MINI-6mqf-9qhr-rw7x, MINI-6p2g-xf2g-8729, MINI-6q47-v797-r2vv, MINI-6vq4-9rcg-q8c4, MINI-6xqw-rxfh-8cw3, MINI-7284-gqf6-458c, MINI-74xp-q9mv-67q4, MINI-77cp-678x-c554, MINI-79q7-m8qj-q63h, MINI-7j77-j5jc-x8g2, MINI-7jrm-95mh-f8rh, MINI-7qjv-56rh-5ph7, MINI-7vg3-664x-vcpm, MINI-84q6-hmq6-cf5f, MINI-853j-5hrv-v52v, MINI-8779-gmm5-329w, MINI-88r3-f742-p4w4, MINI-8973-285w-m9cj, MINI-8f88-ff56-qr7r, MINI-8hf4-wr83-86x5, MINI-8j3q-qmrp-322h, MINI-8qw7-xf87-5635, MINI-8vp6-54rc-jr7w, MINI-8vvv-rpxw-pv7q, MINI-8wfj-jxpv-r3wr, MINI-92q2-qrc2-3x7x, MINI-9323-q948-r3gp, MINI-954q-rqww-3rgf, MINI-95v3-5p4r-fm33, MINI-99vv-gx74-4r97, MINI-9hr2-4853-5299, MINI-9pmq-5q7m-x56v, MINI-9rfw-mg3f-7x2v, MINI-9rvp-2gf5-2444, MINI-9wjh-6jqx-9jwm, MINI-c6mx-f6q7-2xrf, MINI-c78g-7wwp-6c6x, MINI-c7j5-x48m-mq2v, MINI-c8w3-fhm8-58pf, MINI-cf46-7qcx-xmx2, MINI-cghh-cjf6-m798, MINI-cj55-vg54-rp66, MINI-cjp2-cc99-vj85, MINI-cmgc-6vm6-pcfq, MINI-cvph-48qc-pj4r, MINI-cwww-6c42-x7pm, MINI-cx2c-gq4r-f5h5, MINI-f2fr-cvqv-7vgp, MINI-f5c6-wxx2-crqx, MINI-f5g8-8fmx-9cr7, MINI-f6c5-3v82-q79p, MINI-f75g-m3g4-fr3f, MINI-f79h-gr3r-qcfq, MINI-f99p-7xh2-x387, MINI-ffjf-794v-9wvj, MINI-fgv7-ff8f-h2r3, MINI-fjhr-g9j4-cvh3, MINI-fm5h-83hp-6fg5, MINI-fwrf-v868-p7pf, MINI-g26j-2cmw-289f, MINI-g2rc-p4vf-p2gm, MINI-g3g5-chmc-c4x8, MINI-g3h9-9jcm-3wpx, MINI-g484-j5rr-3q9h, MINI-g554-3m7r-gqwg, MINI-g7cr-449x-83c8, MINI-g9g2-xggh-5pxf, MINI-gc42-pgw9-jmch, MINI-gfp4-p698-p7ph, MINI-gh4f-8c9f-9vrh, MINI-ghg4-3g4h-38rv, MINI-gmrc-2xg4-57h3, MINI-gr9x-q588-85j9, MINI-gw6c-wm3c-9v34, MINI-gxwg-x7g4-vpw8, MINI-h24g-p5qr-9fgj, MINI-h8v5-fhwx-p8wc, MINI-h9g6-mh5h-vg7p, MINI-hrhw-mj9m-p76v, MINI-hvrc-vjrr-9w78, MINI-hvvm-2qqv-ph8v, MINI-hvw7-w9cg-hxhr, MINI-j2vx-j76j-q82w, MINI-j3g7-w7cw-4jpc, MINI-j6qq-9jfh-gfmx, MINI-j785-ppc2-6xhg, MINI-j847-m4qg-q32q, MINI-jf22-fh2h-fp95, MINI-jf4q-j9wh-88cg, MINI-jm5c-gf74-cw5q, MINI-jqvx-c54p-j9qf, MINI-jr76-j7q6-94p5, MINI-jvfj-fr76-xvrc, MINI-jwg8-gc8x-jv5h, MINI-jwx8-rmf7-6q4p, MINI-m25q-g8x9-9j7p, MINI-m2g9-mjxq-q6m9, MINI-m2p5-hpg2-68vp, MINI-m46p-7vjg-pcjj, MINI-m7wr-4rg6-82x2, MINI-m896-fwh4-35g6, MINI-m935-gcp7-3hgw, MINI-m9g4-34m4-gx5j, MINI-mcpx-xvr2-vqh6, MINI-mf9f-3rc3-wvpp, MINI-mgq7-2w7r-prp3, MINI-mgvx-fp96-pc55, MINI-mh8j-v8h2-44p5, MINI-mp5v-hpcv-49fj, MINI-mpjc-p8xw-cfjv, MINI-mqmx-mgh4-vfqj, MINI-mvp2-w492-75mx, MINI-p2mr-hh9x-v6f5, MINI-p367-q2hq-jqqg, MINI-p47p-cxq5-wf77, MINI-p4gp-86qf-7hrw, MINI-p6rg-v6cq-68jw, MINI-p9h6-2j59-72xw, MINI-pc6v-xf5w-cmq8, MINI-pmg9-vw2p-2xgj, MINI-ppq4-m533-g8gr, MINI-pqw6-8864-fgcf, MINI-pvh4-jgjm-r2v7, MINI-pvqr-3wqc-69pq, MINI-pwcx-g4qm-7c89, MINI-pwg2-vgw5-w63c, MINI-q2h4-52fc-74fp, MINI-q33m-vxfj-6h2c, MINI-q3wj-pgpw-3942, MINI-q489-hg54-2v33, MINI-q496-4vrh-mcfx, MINI-q788-q5pp-8682, MINI-q7vq-5q8p-vrjp, MINI-q8h5-x7vh-m728, MINI-q8w2-hp89-98pg, MINI-qf3c-v7c8-vcw6, MINI-qh38-qpmq-jfgp, MINI-qhvq-pr2v-m22h, MINI-qjj6-4wxq-6pw8, MINI-qjrf-mpc7-7wpf, MINI-qmpm-6465-f8wx, MINI-qmrf-992x-jc6c, MINI-qpq7-7234-62pf, MINI-qv6c-4h68-25f6, MINI-qwg3-3c4r-fvr5, MINI-r252-9mwf-5v9m, MINI-r39c-2hx4-7pcf, MINI-r47f-3fwg-rqcm, MINI-r4wv-4hx5-94r2, MINI-r53p-vqx5-j9xr, MINI-r737-8jc6-vw93, MINI-r73h-4q77-j8ww, MINI-rm74-qw9q-65c8, MINI-rp34-r725-9753, MINI-rv2m-xc27-x79g, MINI-rwr5-v7h7-rmgv, MINI-rxf5-qjf6-9422, MINI-v487-mh59-q2cq, MINI-v4vg-fmg4-hmmm, MINI-v8j3-qwrc-p5mc, MINI-v8w4-3hmp-67hm, MINI-vc58-xvwj-rqqx, MINI-vm5j-935c-m5qg, MINI-vmgj-w373-4jq6, MINI-vq37-w9j8-53f4, MINI-vqxg-jxwg-7vcm, MINI-vrf7-333f-2r9r, MINI-vv44-2g98-pg2m, MINI-vw93-c5m9-j88w, MINI-vwgp-3wrm-jg36, MINI-vwmr-vcwq-6r7q, MINI-w264-6hr5-2gfh, MINI-w2gv-f9r3-mx48, MINI-w2rw-24hr-q4r8, MINI-w47g-99g8-x8w5, MINI-w7c6-xp6j-jhmc, MINI-w7gh-pc47-5j9c, MINI-w82q-x8h6-3q36, MINI-wfc5-cp4j-j38r, MINI-wghr-8gpg-ffw7, MINI-whm3-8h8x-9g95, MINI-wjgr-9xxp-wcv2, MINI-wm3p-qjgr-5prx, MINI-wmh4-3v54-xh2h, MINI-wmv5-cjr2-22hc, MINI-wp9p-5vxv-hjhr, MINI-wrm6-6q37-85r3, MINI-wwfx-fmwm-cgvg, MINI-x26j-344v-g2j9, MINI-x2qg-vpf2-g8pp, MINI-x48g-2fxp-r9hj, MINI-x8r4-x4mj-79m2, MINI-x98j-2rqp-rpg3, MINI-x9xm-f2hv-pm36, MINI-xcg4-jq22-j698, MINI-xf9m-492m-hwgc, MINI-xh75-xq2r-3cpj, MINI-xm2w-7vw4-xgch, MINI-xmjh-cwg7-pf57, MINI-xmv4-hg3m-6fwm, MINI-xqxw-49qv-p89f, MINI-xr8c-vr77-5mrm, MINI-xvvj-fx9r-2c4f, MINI-xw5f-26mp-gfqr, MINI-xwf2-8358-prqq, MINI-xwxm-782q-6hrh, MINI-xxc8-328j-v2f8, MINI-xxfg-hwmj-wpqm, ROOT-OS-DEBIAN-13-CVE-2025-58186, UBUNTU-CVE-2025-58186

## What is CVE-2025-58186?

CVE-2025-58186 is a medium-severity denial of service vulnerability in Go standard library net/http, published on 29 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

## Which versions are affected by CVE-2025-58186?

2 open source packages ship an affected version, including golang and stdlib.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `golang` | Bitnami | All versions | 1.24.8, 1.25.2 |
| `stdlib` | Go | All versions | 1.24.8, 1.25.2 |

## How do I fix CVE-2025-58186?

Upgrade golang to a fixed version for your release line: 1.24.8 or 1.25.2.

## Is CVE-2025-58186 being exploited?

There is no known exploitation of CVE-2025-58186 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-58186 and fix it if it is affected.

What it is: CVE-2025-58186 is a medium-severity denial of service vulnerability in Go standard library net/http, published on 29 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-58186 in the wild and no public exploit code.

Affected packages and fixed versions:
- golang (Bitnami): affected all versions; fixed in 1.24.8, 1.25.2
- stdlib (Go): affected all versions; fixed in 1.24.8, 1.25.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-58186/ (Markdown: https://insights.sbomify.com/CVE-2025-58186/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-58186
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-58186
- OSV: https://osv.dev/vulnerability/CVE-2025-58186

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-58186/
Summaries are generated and may contain mistakes; the official description above is the record.
