Description
Improper certificate validation in PkixNameConstraintValidator (ExtractHostFromURL) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows a name-constrained subordinate CA, or anyone able to obtain certificates with chosen subjectAltName URIs from such a CA, to bypass permitted or excluded uniformResourceIdentifier name constraints during certification path validation via a URI whose path, query, fragment or userinfo contains characters such as '@' or ':', because the host was extracted by string slicing without first isolating the RFC 3986 authority component, so the host compared against the constraints could differ from the URI's actual host.
Published: 2026-10-02
Score: 8.2 High
EPSS: < 1% Very Low
KEV: No
Impact: Bypass of certificate name constraints
Action: Apply patch
AI Analysis

Impact

Improper certificate validation in Bouncy Castle’s .NET library bc‑csharp allows a certificate issued by a name‑constrained subordinate CA, or any attacker who can obtain a certificate with a subjectAltName URI chosen from such a CA, to bypass the uniformResourceIdentifier name‑constraint checks during certification path validation. The flaw arises because the ExtractHostFromURL routine slices the hostname from the URL string without first isolating the RFC 3986 authority component. If the URI contains characters such as '@' or ':', the extracted host can differ from the actual host, causing the library to incorrectly compare a different host against the allowed or excluded constraints.

Affected Systems

The Bouncy Castle bc‑csharp library versions earlier than 2.7.0 are affected. Any application that relies on this library for X.509 certificate path validation and enforces name constraints is vulnerable, including custom clients or servers that validate TLS certificates using bc‑csharp.

Risk and Exploitability

The vulnerability carries a CVSS score of 8.2, indicating high severity. No EPSS value is available and it is not listed in the CISA KEV catalog. The attack vector is remote; an attacker must first obtain a valid certificate from a compromised or malicious name‑constrained CA or create a certificate that includes a subjectAltName URI with special characters. When such a certificate is presented to a validating system that uses bc‑csharp, the mis‑parsed host causes the library to skip the name‑constraint comparison, allowing the certificate to be accepted and used for authentication or encryption. Because the flaw does not require local access and exploits normal certificate infrastructure, the potential impact is significant for any product that performs strict path validation.

Generated by OpenCVE AI on October 2, 2026 at 09:10 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade bc‑csharp to version 2.7.0 or later to receive the patched host extraction logic
  • If upgrading is not immediately possible, disable URI name‑constraint checks in your application or switch to another validation library that correctly parses RFC 3986 URIs
  • Add custom verification of certificate subjects or hostnames in your application logic to detect mismatches caused by malformed URI components

Generated by OpenCVE AI on October 2, 2026 at 09:10 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 02 Oct 2026 07:30:00 +0000

Type Values Removed Values Added
Description Improper certificate validation in PkixNameConstraintValidator (ExtractHostFromURL) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows a name-constrained subordinate CA, or anyone able to obtain certificates with chosen subjectAltName URIs from such a CA, to bypass permitted or excluded uniformResourceIdentifier name constraints during certification path validation via a URI whose path, query, fragment or userinfo contains characters such as '@' or ':', because the host was extracted by string slicing without first isolating the RFC 3986 authority component, so the host compared against the constraints could differ from the URI's actual host.
Title URI name constraints checked against a mis-parsed host
Weaknesses CWE-295
References
Metrics cvssV4_0

{'score': 8.2, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: bcorg

Published:

Updated: 2026-10-02T07:07:02.513Z

Reserved: 2026-07-16T23:51:51.306Z

Link: CVE-2026-63576

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-02T08:17:02.787

Modified: 2026-10-02T14:44:52.247

Link: CVE-2026-63576

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-02T09:15:08Z

Weaknesses
  • CWE-295

    Improper Certificate Validation