Vulnerability · Published Oct 29, 2025 · Assigned by Go

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

High 7.5

In plain English

A high-severity security flaw in crypto/x509 from Go standard library. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 35% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)0.4%top 64.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.22go1.24.8-r0ALPINE-CVE-2025-58187
Alpine:v3.23go1.25.2-r0ALPINE-CVE-2025-58187
Alpine:v3.24go1.25.2-r0ALPINE-CVE-2025-58187
Debian:12golang-1.19no fix listedDEBIAN-CVE-2025-58187
Debian:13golang-1.24no fix listedDEBIAN-CVE-2025-58187
Gostdlib1.24.9, 1.25.3GO-2025-4007
Ubuntu:22.04:LTSgolang-1.17no fix listedUBUNTU-CVE-2025-58187
Ubuntu:22.04:LTSgolang-1.18no fix listedUBUNTU-CVE-2025-58187
Ubuntu:22.04:LTSgolang-1.20no fix listedUBUNTU-CVE-2025-58187
Ubuntu:22.04:LTSgolang-1.21no fix listedUBUNTU-CVE-2025-58187
Ubuntu:24.04:LTSgolang-1.21no fix listedUBUNTU-CVE-2025-58187
Ubuntu:22.04:LTSgolang-1.22no fix listedUBUNTU-CVE-2025-58187
Ubuntu:24.04:LTSgolang-1.22no fix listedUBUNTU-CVE-2025-58187
Ubuntu:22.04:LTSgolang-1.23no fix listedUBUNTU-CVE-2025-58187
Ubuntu:24.04:LTSgolang-1.23no fix listedUBUNTU-CVE-2025-58187
Ubuntu:25.10golang-1.23no fix listedUBUNTU-CVE-2025-58187
Ubuntu:26.04:LTSgolang-1.23no fix listedUBUNTU-CVE-2025-58187
Ubuntu:22.04:LTSgolang-1.24no fix listedUBUNTU-CVE-2025-58187
Ubuntu:24.04:LTSgolang-1.24no fix listedUBUNTU-CVE-2025-58187
Ubuntu:25.10golang-1.24no fix listedUBUNTU-CVE-2025-58187
Ubuntu:26.04:LTSgolang-1.24no fix listedUBUNTU-CVE-2025-58187
Ubuntu:22.04:LTSgolang-1.25no fix listedUBUNTU-CVE-2025-58187
Ubuntu:24.04:LTSgolang-1.25no fix listedUBUNTU-CVE-2025-58187
Ubuntu:25.10golang-1.25no fix listedUBUNTU-CVE-2025-58187

Affected products (as reported)

VendorProductVersions
Go standard library crypto/x509 0 – before 1.24.91.25.0 – before 1.25.3

References