Improper Certificate Validation Affecting bouncycastle.cryptography package, versions [,2.7.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.24% (14th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DOTNET-BOUNCYCASTLECRYPTOGRAPHY-20537029
  • published6 Oct 2026
  • disclosed2 Oct 2026

Introduced: 2 Oct 2026

NewCVE-2026-63577  (opens in a new tab)
CWE-295  (opens in a new tab)

How to fix?

Upgrade BouncyCastle.Cryptography to version 2.7.0 or higher.

Overview

Affected versions of this package are vulnerable to Improper Certificate Validation via the WithinDNSubtree method in PkixNameConstraintValidator.cs. An attacker who controls, or can obtain certificates from, a name-constrained intermediate CA can have a certificate accepted by PKIX path validation by placing unrelated RDNs before a copy of the permitted distinguished-name sequence, causing a subject DN or directoryName subjectAltName outside the allowed subtree to pass the name-constraints check.

Workarounds

  • Ensure X509Sgp22NameConstraints is not enabled unless you explicitly need the relaxed GSMA SGP.22 matching behavior; leaving it disabled keeps directoryName name-constraint checks on the strict RFC 5280 prefix-matching path and blocks certificates that try to satisfy a constraint by prepending unrelated RDNs.

CVSS Base Scores

version 4.0
version 3.1