# CVE-2025-58187: Quadratic complexity when checking name constraints in crypto/x509

> Attackers can cause excessive CPU consumption in Go applications validating certificate chains due to quadratic complexity in name constraint checking.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **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:** 20 Nov 2025
- **Also known as:** AZL-78913, AZL-98688, BELL-CVE-2025-58187, BIT-golang-2025-58187, CLEANSTART-2026-OG31778, CLEANSTART-2026-TT67272, CLEANSTART-2026-UA69127, CLEANSTART-2026-UM83284, DEBIAN-CVE-2025-58187, ECHO-95de-fbcf-cf4c, GHSA-frhw-mqj2-wxw2, GO-2025-4007, MINI-232q-wh3j-fjf6, MINI-238x-73gj-jfp7, MINI-23rv-mff2-rfxj, MINI-246f-xg78-2wqq, MINI-24h6-8hhf-6pxm, MINI-2744-4rh7-47q4, MINI-283q-prjv-wmrf, MINI-2p32-2cfm-fv9w, MINI-2q3r-cphf-c3qm, MINI-2rrm-5c58-x6h6, MINI-2v77-c3mx-25vf, MINI-2wp6-983x-4864, MINI-2x45-x88w-4cw7, MINI-33q2-xj7m-m83g, MINI-3458-pfrw-87xj, MINI-34p5-49wv-99pr, MINI-358g-qcrv-p7q5, MINI-37ww-h3r5-v8p2, MINI-3cmg-57xm-mrr2, MINI-3cx9-5xqh-4968, MINI-3hf9-j58c-47c9, MINI-3hmc-5rpq-8xw4, MINI-3j66-3xcq-8fpm, MINI-3jq2-xjrh-65cc, MINI-3m6p-hrrc-gwjq, MINI-3vx8-q76q-573r, MINI-3x56-568c-5j2j, MINI-43r5-jgcf-r3qg, MINI-4499-5pj4-xvgp, MINI-46cp-h358-7345, MINI-46m5-5f58-r956, MINI-47x5-gxg4-5w29, MINI-4cpf-c2q3-rc63, MINI-4j7r-x76p-xrqx, MINI-4jfr-mqff-x2g8, MINI-4jfx-m69x-3jh4, MINI-4q8f-mpp8-5mjw, MINI-4qxf-56pj-w3p5, MINI-4rv9-c2f5-h2q7, MINI-4vm9-r5rm-7v32, MINI-4w5h-2fjm-m8px, MINI-53gh-wg6h-85wq, MINI-547p-4g56-qmp8, MINI-5483-vpcf-p8x3, MINI-552w-rr33-hr82, MINI-5847-3j9c-grw8, MINI-5879-2jr9-q4m2, MINI-594j-h4m7-xw2c, MINI-5j3m-wgmv-vmjc, MINI-5m6w-725g-m2w2, MINI-5pjw-75f8-37rh, MINI-5qpm-5jf4-9c46, MINI-5rj5-2rw3-c4jc, MINI-5v2q-c7fj-6pw2, MINI-62hq-8c7v-7xjg, MINI-638m-7gfm-5pmp, MINI-64c6-h2p7-m6w2, MINI-64xg-mh5j-m2mp, MINI-665q-3xff-2g4g, MINI-6855-m8ch-g78f, MINI-6cm9-rvwg-wgg4, MINI-6m6v-qjrm-qm69, MINI-6m99-62m7-5xcq, MINI-6mjc-xcf2-qqmp, MINI-6p3r-76p6-cpqm, MINI-6rcr-23xx-wv3r, MINI-6wm6-c4mv-qgxw, MINI-6wxw-w4g2-v746, MINI-72gg-xgvh-qqqf, MINI-7457-cf5q-cvv6, MINI-74vh-c3p7-223v, MINI-74xc-754x-9rpc, MINI-7632-2fch-23vv, MINI-7668-8234-5jrw, MINI-76r2-xcp9-4ww9, MINI-772m-5p67-j8qr, MINI-7f5f-5fm3-qwc3, MINI-7gqm-v64x-q7wp, MINI-7gxq-hgxv-46pc, MINI-7h53-968j-26m2, MINI-7q6h-67fq-mg5v, MINI-7r5v-86w9-4hwj, MINI-7v2c-345c-46wx, MINI-7xhm-243x-8wrw, MINI-8299-pvq9-c4jq, MINI-82cx-6fx5-m7cg, MINI-882f-9xqx-m487, MINI-8c75-hrvr-v6v9, MINI-8f2p-6wc6-qw56, MINI-8f88-wpf8-fcr7, MINI-8fp8-6qph-835v, MINI-8gj8-4hcv-4562, MINI-8grw-965v-qxxj, MINI-8j4j-7353-7rrj, MINI-8j5j-vxv7-q973, MINI-8jf6-755f-55qc, MINI-8mrq-6rmf-mw8r, MINI-8x26-vp3q-p58x, MINI-8x5f-f44f-v34f, MINI-945v-f59j-mvh3, MINI-948q-vpgq-ccr9, MINI-962g-rpj3-jc84, MINI-99qx-cqmm-xc43, MINI-9c3j-682v-p827, MINI-9c9g-7frg-9jc8, MINI-9hp4-w6mq-fq34, MINI-9jfc-wg54-4mgr, MINI-9mmm-75x9-3f9f, MINI-9q8w-646g-qmm5, MINI-9qc6-r58h-q5xm, MINI-9qm6-2qf6-g2gr, MINI-9qp9-h8m4-9277, MINI-9qw5-jcm8-358j, MINI-9rj6-r27g-fh2x, MINI-9v9x-v73m-j5cq, MINI-9vj7-9x2p-445v, MINI-9wv9-h753-wwj7, MINI-9xc7-q3cq-qmg8, MINI-c25j-w7hm-cgrm, MINI-c342-fjvq-qh66, MINI-c378-p6fp-pxgc, MINI-c4gc-r86g-5hmr, MINI-c6v8-gg2p-hvg6, MINI-c83m-3pwp-97wx, MINI-c8c9-cr5j-4r75, MINI-ccv4-hmmp-xjr2, MINI-cg67-qjhq-mp57, MINI-chpx-jr79-x3v8, MINI-cpc4-mhp4-9phr, MINI-cpwv-g5hr-6xf9, MINI-cqcc-cxh3-3pr6, MINI-cqgp-pm93-wrr8, MINI-cr4w-74wh-r584, MINI-cr78-ffr6-rmc7, MINI-cv53-43p2-vp2x, MINI-cx33-987r-rjwc, MINI-f2mm-336f-3m46, MINI-f69g-8f53-6r2c, MINI-fg3f-r6rg-jfq2, MINI-fg6v-924r-gv8h, MINI-fv3m-cwcf-qwf9, MINI-fv4x-phpv-mc28, MINI-fx4p-qq53-qj69, MINI-fx5g-8qfc-vhp8, MINI-fxjr-2969-385r, MINI-g23x-p27q-hr7j, MINI-g2c6-7v97-2p24, MINI-g33j-g8p2-944v, MINI-g33v-77qv-62wr, MINI-g452-gc5p-pc2g, MINI-g5g7-xfmr-xqx9, MINI-g5x3-4gf9-6cp9, MINI-g66q-q4hm-2qr5, MINI-g84x-8mwm-g7q9, MINI-g86h-x5j3-c78w, MINI-g9qc-4pq9-922v, MINI-gf27-r4qp-qg5j, MINI-gf2m-45pp-78cf, MINI-gf5h-hgrf-r584, MINI-gg56-3vqp-wh8c, MINI-gg5g-q24r-9v7v, MINI-gjhg-86mf-m4x7, MINI-gmq6-vj2c-xvx7, MINI-gp4m-pxmp-gfp9, MINI-gxh9-q74j-6m5q, MINI-gxp6-c3vq-r2x5, MINI-h28v-xj9m-7hq6, MINI-h3gf-78rq-62qx, MINI-hc63-q5vv-9w24, MINI-hcc7-gjwq-jr8r, MINI-hh6f-37r8-mhgx, MINI-hhww-xjqp-qq8h, MINI-hj87-hmh4-g77h, MINI-hmw3-5xf4-jcjw, MINI-hqrh-wh95-jwqj, MINI-hv97-56wr-fx65, MINI-j2qm-6v88-w5vg, MINI-j48r-m7v6-mr38, MINI-j79p-9pj7-q82q, MINI-j95x-5cjp-g7g6, MINI-j97j-cqcf-5qm4, MINI-jf42-4f42-4r6h, MINI-jj7v-5fmf-9p5p, MINI-jprg-2c25-x2gc, MINI-m374-25rh-r47c, MINI-m4r7-77v4-fj3g, MINI-m5pg-f758-x9r2, MINI-m6fh-9hjc-jjp6, MINI-m6hf-crq9-mm5f, MINI-m7xg-9m65-jwrr, MINI-m8h2-gwgp-2prx, MINI-mcc4-638h-g2xx, MINI-mcjj-w8c6-7q36, MINI-mf95-7r23-v6fq, MINI-mgj3-f4w8-97fr, MINI-mgjr-rrxx-g74g, MINI-mpq6-p3h2-6h96, MINI-mv94-5jr9-rc78, MINI-mw65-m58f-xxpc, MINI-p2jq-c9r4-p7rw, MINI-p32g-7r8q-hq9x, MINI-p37q-xmq3-97hw, MINI-p588-w7r9-v92c, MINI-p659-2247-vj8h, MINI-p7rh-qpxh-34x2, MINI-p85j-ff4j-29qw, MINI-p885-25rv-r7g2, MINI-p96w-7rwp-jrpm, MINI-pjg6-g23f-ggf5, MINI-pv7g-m2mg-pr4h, MINI-pvjx-h64x-cwmr, MINI-q425-9cjf-wxcw, MINI-q4hx-88qf-56rw, MINI-q5f6-vfrm-pwrp, MINI-qc99-2483-q236, MINI-qcmg-7qhj-rr3v, MINI-qcp9-6h8r-7p94, MINI-qg6j-rff7-gj2w, MINI-qgqc-xw96-6vj9, MINI-qhgm-32vc-vwmg, MINI-qqgh-wr96-84cc, MINI-qrch-8mj9-h64v, MINI-qrvr-74f5-cgh6, MINI-qrvw-8cq7-qgh6, MINI-qw77-88gf-97pm, MINI-qx34-23cx-pmg5, MINI-qxgm-mqrc-7wrc, MINI-r23g-82r2-jpxq, MINI-r27g-wvg4-77m5, MINI-r2w8-wwp2-8h38, MINI-r3vw-pfrf-7762, MINI-r44m-3v8v-3jrv, MINI-r6mw-fm95-jhh2, MINI-r8c2-wfgq-2hh2, MINI-r8p9-q88p-gmp5, MINI-r8wv-6hq2-9mx6, MINI-rc5w-pmxx-9fgx, MINI-rfgq-x742-x472, MINI-rg3c-5x4f-rjpq, MINI-rg69-m327-3vx9, MINI-rhv8-x83p-gx52, MINI-rpcw-3cg8-23m7, MINI-rpfh-gjrv-grc6, MINI-rq58-p39p-v86q, MINI-rrf4-m2mq-m2m5, MINI-rvfx-wwmh-m55p, MINI-rwrx-wpm6-qm49, MINI-rx23-mxf9-289w, MINI-rx34-7hpr-f5xr, MINI-v26g-w5q8-9cjp, MINI-v2qp-m68r-fw48, MINI-v3g5-3f78-4mgf, MINI-v6fq-rph2-ffc4, MINI-vg2v-3789-j87x, MINI-vgqh-pjr2-4hjf, MINI-vhjx-fx45-jxp8, MINI-vp27-3g6c-pjf6, MINI-vp34-r8vg-fqhm, MINI-vvr2-72rh-qcm9, MINI-vxm7-jq49-qxr9, MINI-vxmc-65f9-6g2h, MINI-w234-4rx2-v6cq, MINI-w2j7-fm33-5jqx, MINI-w4qm-frx7-rm3x, MINI-w6wf-cc9v-fr4f, MINI-w7f4-9qpr-p8hx, MINI-w895-f7fr-w5w5, MINI-w9wv-7f3x-5fx8, MINI-wg54-xhj9-whgp, MINI-wg9r-5rmx-7fcg, MINI-wjg2-43hx-c57v, MINI-wmfc-wcrc-qjpg, MINI-wrp7-j734-7wr3, MINI-wrxx-jf28-3q4w, MINI-wvhc-79vp-xcff, MINI-wx9c-6m7x-gr6m, MINI-x6hj-6wvj-97xc, MINI-x7v3-5c9c-6gv3, MINI-x84r-pw3c-v2c5, MINI-x87c-757f-c5x3, MINI-x9gm-hp6f-vx5x, MINI-xq2w-qp6c-7cmj, MINI-xr9g-2jx9-7mm4, ROOT-OS-DEBIAN-13-CVE-2025-58187, SUSE-SU-2025:3681-1, UBUNTU-CVE-2025-58187

## What is CVE-2025-58187?

CVE-2025-58187 is a high-severity denial of service vulnerability in Golang Go, published on 29 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Due to the design of the name constraint checking algorithm, the processing time of some inputs scale non-linearly with respect to the size of the certificate. This affects programs which validate arbitrary certificate chains.

Weakness: CWE-407 (Inefficient Algorithmic Complexity)

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

2 open source packages ship an affected version, including golang and stdlib. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `golang` | Bitnami | All versions | 1.24.9, 1.25.3 |
| `stdlib` | Go | All versions | 1.24.9, 1.25.3 |
| `go1.25` | SUSE:Enterprise Storage 7.1 | All versions | 1.25.3-150000.1.19.1 |
| `go1.25` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 1.25.3-150000.1.19.1 |
| `go1.25` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 1.25.3-150000.1.19.1 |
| `go1.25` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 1.25.3-150000.1.19.1 |
| `go1.25` | SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | All versions | 1.25.3-150000.1.19.1 |
| `go1.25` | SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | All versions | 1.25.3-150000.1.19.1 |
| `go1.25` | SUSE:Linux Enterprise Module for Development Tools 15 SP6 | All versions | 1.25.3-150000.1.19.1 |
| `go1.25` | SUSE:Linux Enterprise Module for Development Tools 15 SP7 | All versions | 1.25.3-150000.1.19.1 |
| `go1.25` | SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 1.25.3-150000.1.19.1 |
| `go1.25` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 1.25.3-150000.1.19.1 |
| `go1.25` | SUSE:Linux Enterprise Server 15 SP5-LTSS | All versions | 1.25.3-150000.1.19.1 |
| `go1.25` | SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 1.25.3-150000.1.19.1 |
| `go1.25` | SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 1.25.3-150000.1.19.1 |
| `go1.25` | SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | All versions | 1.25.3-150000.1.19.1 |
| `go1.25` | openSUSE:Leap 15.6 | All versions | 1.25.3-150000.1.19.1 |

Products: Golang Go.

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

Upgrade golang to a fixed version for your release line: 1.24.9 or 1.25.3.

## Is CVE-2025-58187 being exploited?

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

## Other vulnerabilities in Golang Go

- [CVE-2020-0601](https://insights.sbomify.com/CVE-2020-0601/): Microsoft Windows CryptoAPI Spoofing (high 8.1, exploited in the wild)
- [CVE-2026-27143](https://insights.sbomify.com/CVE-2026-27143/): Missing bound checks can lead to memory corruption in safe Go in cmd/compile (critical 9.8)
- [CVE-2024-24790](https://insights.sbomify.com/CVE-2024-24790/): Unexpected behavior from Is methods for IPv4-mapped IPv6 addresses in net/netip (critical 9.8)
- [CVE-2023-39320](https://insights.sbomify.com/CVE-2023-39320/): Arbitrary code execution via go.mod toolchain directive in cmd/go (critical 9.8)
- [CVE-2023-24540](https://insights.sbomify.com/CVE-2023-24540/): Improper handling of JavaScript whitespace in html/template (critical 9.8)

## Fix prompt for AI coding agents

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

What it is: CVE-2025-58187 is a high-severity denial of service vulnerability in Golang Go, 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-58187 in the wild and no public exploit code.

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

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-58187/ (Markdown: https://insights.sbomify.com/CVE-2025-58187/index.md)
```

## Sources

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

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