# CVE-2025-61727: Improper application of excluded DNS name constraints when verifying wildcard names in crypto/x509

> Attackers can bypass DNS name constraints in certificate chains by using wildcard SANs, potentially enabling man-in-the-middle attacks.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Dec 2025
- **Updated:** 3 Dec 2025
- **Also known as:** AZL-71447, AZL-71635, AZL-78927, AZL-98646, BELL-CVE-2025-61727, BIT-golang-2025-61727, CLEANSTART-2026-FP06754, CLEANSTART-2026-NB05641, CLEANSTART-2026-PD73403, CLEANSTART-2026-ZG24378, CLEANSTART-2026-ZZ46372, DEBIAN-CVE-2025-61727, ECHO-1a65-69ef-ad72, GHSA-5mh9-3jwc-rp59, GO-2025-4175, MINI-23xw-8vr2-3crc, MINI-25hj-jgw5-g235, MINI-272j-9775-w3vh, MINI-2938-qp77-c5mh, MINI-2c6f-3jgr-3g64, MINI-2fhv-9wfj-x57j, MINI-2gwm-f3xg-vxxm, MINI-2h6h-mwg3-2mq9, MINI-2hjc-rrjf-j3q8, MINI-2jjf-r9cq-cg2f, MINI-2jv3-pxg6-3q6g, MINI-2m3r-chh2-729h, MINI-2pvg-jg9p-3h27, MINI-2x36-h5pg-c4fc, MINI-2xq2-7w22-x7h5, MINI-342c-fqf3-h3m6, MINI-3574-v2mx-ccj5, MINI-35gj-m79r-cgqx, MINI-3898-55x7-fcq7, MINI-3c2g-85mj-4fjw, MINI-3f5v-68hj-hfrx, MINI-3fhf-xrc7-7xvj, MINI-3fvq-rfr6-7mv9, MINI-3jpg-6j7v-r6hm, MINI-3phf-x78p-xvpg, MINI-3q78-p5f3-w2cc, MINI-3qhc-pcq5-92rx, MINI-3v5m-2c9m-x7wh, MINI-3v78-fv7q-q8f6, MINI-3vvg-v562-g977, MINI-43vv-rq7j-fhph, MINI-4422-w99f-fv2p, MINI-4822-f4v2-cpfj, MINI-49p4-wcwc-pqmm, MINI-4c6h-v9w3-gg2x, MINI-4crr-h3c9-2wfg, MINI-4j4g-qv3r-v2hf, MINI-4qq4-q3mw-fj92, MINI-4qww-mpww-6xv3, MINI-4vh5-rrj2-787j, MINI-4vw3-78qx-hh7p, MINI-4wfm-v5v8-mph9, MINI-4wfp-w3fm-ghh8, MINI-4wrj-w5wc-2m7c, MINI-4wwq-p7gj-pv2w, MINI-4xv2-5hjc-m623, MINI-523f-hfrj-3vc2, MINI-52vc-2v24-rfm7, MINI-53wg-r528-76qj, MINI-53xh-8cm3-f5x2, MINI-56hm-hc39-r3w2, MINI-56jv-6g2h-r7pg, MINI-57rf-g5jw-9jf5, MINI-5fg4-jrq3-qqqp, MINI-5gx4-h6hg-62ww, MINI-5j24-634f-5cmh, MINI-5j9w-pm94-f723, MINI-5r65-gwwx-xqr6, MINI-5rjv-vv73-rf7j, MINI-5v5j-vj9f-2r8h, MINI-5v5r-gm5q-c76x, MINI-5wpj-8rf3-c276, MINI-5wv6-2qfq-5594, MINI-5wxc-wvx9-9pqf, MINI-62fh-fgw8-rr2c, MINI-6432-3p7m-gfqh, MINI-64f4-m762-9rc2, MINI-64xm-m6fv-rfgw, MINI-658j-xj2x-hvc8, MINI-662r-xhw4-p675, MINI-674g-mfw2-92pc, MINI-68g3-98hf-w3p9, MINI-6972-33v3-m9qg, MINI-6ghg-v5mm-x65h, MINI-6jm8-6x9p-73q5, MINI-6m98-865m-2g7w, MINI-6m9c-fgh8-xgwr, MINI-6p3v-99w2-5pvf, MINI-6pqv-w6g2-2ww2, MINI-6wcx-vjg8-rrx8, MINI-6wph-9vp8-47jh, MINI-73gc-q8pc-25qc, MINI-7486-766q-hf62, MINI-74rx-8hvf-q2gx, MINI-74vm-6qxv-4hp5, MINI-75gv-cx7q-6jwh, MINI-793r-mpmf-4vxf, MINI-7963-mjw2-7xrm, MINI-7fx4-rx6x-rj47, MINI-7ghp-mmm7-83p7, MINI-7h38-4phv-2r76, MINI-7jp3-jv58-85cw, MINI-7mjh-crf2-vfmg, MINI-7p6p-3jxc-5x2w, MINI-7qhv-c52p-q2q9, MINI-7qjj-79wj-34mw, MINI-7qrg-fq6g-pr36, MINI-7w87-prcc-768x, MINI-7xxp-9f9q-24p4, MINI-85fj-vxrm-p3c2, MINI-869w-3xm4-vmvg, MINI-87gq-6xm3-xffc, MINI-88f9-wg47-g4h8, MINI-89f7-8qv9-wf4c, MINI-89wv-h487-cv74, MINI-8c4g-9qjw-rpxf, MINI-8h4r-4jvh-2j34, MINI-8jhp-rf76-mrq3, MINI-8pmw-93xc-fw4r, MINI-8pw8-h7wc-x24f, MINI-8pwm-chq6-rhxf, MINI-8q5r-7qc4-52fc, MINI-8r63-7w97-j9qp, MINI-8vf7-84wr-gv56, MINI-8w8x-3xjg-xc7q, MINI-93v6-6h6g-x6fg, MINI-93w5-cgjq-ch2h, MINI-94c2-5p6g-f4gx, MINI-9755-q55q-w647, MINI-976x-p7pw-94v9, MINI-97h8-5q26-7fwf, MINI-99x6-4v69-hxvw, MINI-9h6f-w9gw-ggp4, MINI-9hx3-4p57-rh4q, MINI-9mvq-qcfx-2frh, MINI-9pph-6m3f-jh27, MINI-9r83-3p54-7w5m, MINI-9w7m-2g7j-q6h3, MINI-9x77-qrw6-729j, MINI-9xhm-v4mj-44jm, MINI-c2fm-44qx-7jx4, MINI-c3g2-6pjh-p3pg, MINI-c743-6qf6-cchh, MINI-c95g-q25x-ch26, MINI-c9f7-fx85-wh2j, MINI-cjmq-3f7j-q2f2, MINI-cjp8-j94j-9q3j, MINI-cjph-m5rv-x2cc, MINI-cp46-vp43-vvfx, MINI-cpv3-4jqv-vwg2, MINI-cr25-r9xp-2hrp, MINI-crc3-6wv7-h5m9, MINI-cvgg-xr8p-pg67, MINI-cvw9-q677-482v, MINI-cwrh-v58q-746r, MINI-cxgj-c28h-q959, MINI-f458-mwqj-mw4r, MINI-f468-x266-vq97, MINI-f594-x2rj-2j7f, MINI-f5rh-pfmf-xfxx, MINI-f6p6-9mqq-5gp5, MINI-f7c3-h2gg-hj8m, MINI-f878-2wwf-39c5, MINI-f93f-mw46-3vqq, MINI-f9x9-hwr4-vr98, MINI-fc65-m9q8-q3pg, MINI-fcx5-p436-gqcj, MINI-fhj2-c36v-f5m3, MINI-fjx5-q444-vj2f, MINI-fm6f-m7ww-6cwr, MINI-fmx6-vg2j-6f8x, MINI-fp7j-cpjq-j6mw, MINI-fv2j-fq9r-q88h, MINI-fv3h-56h9-942m, MINI-fw79-99m2-f8m5, MINI-fwc2-6mwp-p9cp, MINI-fxjp-m895-rchm, MINI-g28m-3987-jgmj, MINI-g3fm-g7mf-h2h9, MINI-g7p8-mwh8-2q2w, MINI-g7vp-g233-9rmj, MINI-g9g8-gwj6-855w, MINI-gchp-6pph-6w3g, MINI-gf33-g9f3-2734, MINI-gfv9-3vrx-hgff, MINI-ggxq-6j78-4wj9, MINI-ghx7-f467-8p6g, MINI-gp9c-cvhj-gg26, MINI-gph4-8hx2-9q28, MINI-gppf-7g72-326w, MINI-grx6-v45c-vxv9, MINI-gvvm-qjxh-4hcx, MINI-h3c5-c8gh-5fhp, MINI-h689-8gfx-j25m, MINI-h76c-v54m-w44c, MINI-h7c4-fx8x-323r, MINI-h7wm-7wm5-r5p2, MINI-h987-w5fj-vvm9, MINI-h988-7gvq-mqr7, MINI-h9wp-9498-cf78, MINI-hcfr-94rw-pvrg, MINI-hcj8-xpw9-j4rc, MINI-hfc7-p56f-crjj, MINI-hfx3-38vv-4vrw, MINI-hj8v-4f6p-4q8p, MINI-hm3r-qmph-vg5h, MINI-hpm3-g6gp-5xx3, MINI-hqc5-j76h-p7vg, MINI-hr25-3w72-5cch, MINI-hr87-vqfg-f49f, MINI-hr8h-5267-g6g2, MINI-hrpg-hxw9-9hc6, MINI-hwwj-6mh7-6hmx, MINI-hx98-xpq8-4jc6, MINI-j4g4-qp8r-r67m, MINI-j4v3-5rh2-65jm, MINI-j892-qp75-9g4c, MINI-j8wr-2q59-3jmw, MINI-j9mr-6867-4f94, MINI-jc9v-mwcv-7p44, MINI-jf8w-hv9h-xx79, MINI-jfjv-w5pr-x4m3, MINI-jg4w-rc3h-8cw4, MINI-jgr2-wpf8-5579, MINI-jjgp-8gwj-7xqc, MINI-jp25-jr8m-48v4, MINI-jp3x-2rfh-cw9c, MINI-jphp-q62p-pc2v, MINI-jqvv-prg4-2gmh, MINI-jxrc-xvcx-w3rx, MINI-m374-m3xf-mhhv, MINI-m454-36jj-q2rm, MINI-m4p2-9jjp-ch7p, MINI-m58c-mr8v-324j, MINI-m5cx-7x95-r7f2, MINI-m5qw-m535-27j3, MINI-m6m4-m6r2-gp85, MINI-m74c-4hf3-9vwc, MINI-m8f3-v9g8-m9cf, MINI-m8g3-5q6v-ggqj, MINI-m92x-22wm-ch3q, MINI-m9mj-9x39-qrfg, MINI-mcpm-g64h-36cx, MINI-mcxv-6v3h-6vhj, MINI-mgmr-wfxv-jwwc, MINI-mj7r-686j-w4g7, MINI-mm74-fpgj-q9v6, MINI-mmcf-559v-32vr, MINI-mq58-852p-fhcq, MINI-mqg5-787h-7rwj, MINI-mw2h-wj6x-v62v, MINI-mx8g-m4rx-chrq, MINI-p676-wxw9-qrfp, MINI-p828-4gg8-x43v, MINI-p9v2-5jw4-g5v8, MINI-pcgr-c9xm-8ggm, MINI-phrq-9pxw-mq8c, MINI-pmrq-m9r3-cr4w, MINI-pphx-44fc-jw7p, MINI-ppph-rrg3-x466, MINI-pqgm-x578-783x, MINI-pwj8-gr52-vpj5, MINI-pxjc-2q2v-xgpq, MINI-q2cf-66rh-wvvg, MINI-q3q8-9qmr-cmc9, MINI-q47x-pm6w-vhr7, MINI-q7pq-fwvc-cw7p, MINI-q82x-44h6-pc63, MINI-q8c3-hpqm-cjr6, MINI-q8ww-cxg8-cr95, MINI-q9fj-5mch-qcjv, MINI-qhjg-9w7q-r6c5, MINI-qj9x-8w44-rvqr, MINI-qm24-qrj7-2r93, MINI-qpgr-24f5-47fg, MINI-qrq7-4p8g-7pjf, MINI-qw7v-jwp5-f8xf, MINI-r4m7-3vq4-xwh5, MINI-r4w6-39g9-9m7p, MINI-r4x4-fh3c-hvmr, MINI-r525-xp35-vjv4, MINI-r5qc-253r-phqv, MINI-r6q2-jm6x-gq8p, MINI-rcqc-vrjg-pjp3, MINI-rcqq-56rw-5h89, MINI-rf7m-qgxx-7hxr, MINI-rfm5-jmfj-4qjx, MINI-rh9g-8c25-jxff, MINI-rhfx-h7wc-9c78, MINI-rjwf-f8wg-jff7, MINI-rpwm-x463-p83x, MINI-rqxj-gh6g-35vg, MINI-rr8f-8mg9-hh7q, MINI-rv55-xmp9-pqwh, MINI-rvp9-2656-5x75, MINI-rw9x-32w6-9m3f, MINI-rxgm-48v9-hq6c, MINI-v3cj-f7wx-8gm9, MINI-v3qh-ph3m-6875, MINI-v3x5-82q7-rc5g, MINI-v47x-2xrw-rqpv, MINI-v4j4-hqj7-c5q3, MINI-v5gf-wgr9-3rqx, MINI-v5q4-gq89-j6r5, MINI-v6v4-26j9-rr5r, MINI-v955-wc4j-q2x4, MINI-vf6c-qhw3-pm86, MINI-vg3q-x8g8-h4m2, MINI-vjxj-h5qj-6v9g, MINI-vmjf-9gw8-fwgc, MINI-vpwm-392w-h8c2, MINI-vq27-mg5r-3qf3, MINI-vq65-hp47-9mv3, MINI-vqpw-q5xp-qc99, MINI-vr3c-2mrp-v8fw, MINI-vvqw-xhqp-3fg4, MINI-w3wx-gwjh-rp6j, MINI-w445-8fhj-3634, MINI-w44m-p6mh-9hr7, MINI-w46q-22hm-pqxm, MINI-w4f3-f892-6jjp, MINI-w63h-h9mg-pf26, MINI-w734-59fc-4r46, MINI-w89c-7r8f-4q82, MINI-w8f7-qp64-q8hr, MINI-wcjv-v43g-jmm4, MINI-wcw5-3578-4vh2, MINI-wffj-6pw5-jhhg, MINI-wgc4-rf7j-g835, MINI-wh5q-jg7h-mhqm, MINI-wh8j-jjph-6qg4, MINI-whc7-87wr-c5mh, MINI-wmvv-wj23-23g6, MINI-wmwv-7mcw-3r9f, MINI-wqgj-h4rm-g3mf, MINI-wrhv-xf7v-r4pg, MINI-wv74-443w-vqcv, MINI-wx4q-cwx4-pgfw, MINI-x4qj-cr2r-cqhc, MINI-x64g-m2j4-mf9x, MINI-x75j-59cv-7cq8, MINI-x7mh-3747-m746, MINI-x8xx-9322-495q, MINI-x9g3-9hp8-878j, MINI-x9v8-54hg-mcx4, MINI-xcp5-9x4h-87c7, MINI-xfqh-whxg-9p3m, MINI-xhcg-6xmj-wcw4, MINI-xj44-8637-6x7f, MINI-xjxm-ch5c-w5fw, MINI-xpxm-vw2v-r632, MINI-xq42-8v4w-ww29, MINI-xrc8-fgc9-2fqm, MINI-xrvm-56vj-jchh, MINI-xvc7-c2x7-xqp4, MINI-xw65-3m86-32r2, MINI-xxq3-vrc6-wr22, OESA-2025-2863, OESA-2025-2864, OESA-2025-2866, RHSA-2026:7070, ROOT-OS-DEBIAN-13-CVE-2025-61727, UBUNTU-CVE-2025-61727, openSUSE-SU-2026:10031-1

## What is CVE-2025-61727?

CVE-2025-61727 is a medium-severity vulnerability in Golang Go, published on 3 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

An excluded subdomain constraint in a certificate chain does not restrict the usage of wildcard SANs in the leaf certificate. For example a constraint that excludes the subdomain test.example.com does not prevent a leaf certificate from claiming the SAN *.example.com.

Weakness: CWE-295 (Improper Certificate Validation)

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

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.11, 1.25.5 |
| `stdlib` | Go | All versions | 1.24.11, 1.25.5 |
| `golang-fips1.25` | Red Hat:hummingbird:1 | All versions | 0:1.25.8-0.1.hum1 |
| `golang-fips1.25-bin` | Red Hat:hummingbird:1 | All versions | 0:1.25.8-0.1.hum1 |
| `golang-fips1.25-docs` | Red Hat:hummingbird:1 | All versions | 0:1.25.8-0.1.hum1 |
| `golang-fips1.25-misc` | Red Hat:hummingbird:1 | All versions | 0:1.25.8-0.1.hum1 |
| `golang-fips1.25-race` | Red Hat:hummingbird:1 | All versions | 0:1.25.8-0.1.hum1 |
| `golang-fips1.25-src` | Red Hat:hummingbird:1 | All versions | 0:1.25.8-0.1.hum1 |
| `golang-fips1.25-tests` | Red Hat:hummingbird:1 | All versions | 0:1.25.8-0.1.hum1 |
| `kubelogin` | openSUSE:Tumbleweed | All versions | 0.2.14-1.1 |

Products: Golang Go.

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

Upgrade golang to a fixed version for your release line: 1.24.11 or 1.25.5.

## Is CVE-2025-61727 being exploited?

There is no known exploitation of CVE-2025-61727 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-61727 and fix it if it is affected.

What it is: CVE-2025-61727 is a medium-severity vulnerability in Golang Go, published on 3 Dec 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-61727 in the wild and no public exploit code.

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

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

## Sources

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

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