CVE-2026-103602 in bc-csharp
Summary
by MITRE • 10/02/2026
Improper certificate validation in PkixNameConstraintValidator in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows an attacker who controls, or can obtain certificates from, a name-constrained intermediate CA to have certificates accepted during PKIX certification path validation for email addresses, DNS names or URI hosts that lie within excluded subtrees applying to that CA, via an rfc822Name, dNSName or uniformResourceIdentifier name whose host ends with a dot, because names and constraints were compared without first removing the RFC 1034 root-label trailing dot, so a fully qualified host name did not match an excluded subtree for the same host written without the dot.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 10/02/2026
The vulnerability identified in PkixNameConstraintValidator within Legion of the Bouncy Castle Inc. bc-csharp versions prior to 2.7.0 represents a critical failure in certificate path validation logic, specifically concerning how name constraints are processed during PKIX certification path verification. This flaw allows an attacker who controls or can obtain certificates from a name-constrained intermediate Certificate Authority to bypass security restrictions designed to limit the scope of valid identities. The core technical issue stems from a lack of normalization when comparing domain names against exclusionary constraints defined in X.509 certificate extensions. Specifically, the validator fails to strip the trailing dot that signifies a fully qualified domain name according to RFC 1034 before performing string comparisons with excluded subtrees. This oversight creates a discrepancy where a hostname ending in a dot is treated as distinct from the same hostname without the trailing character, effectively rendering certain exclusion rules ineffective for fully qualified names.
From an operational perspective, this defect undermines the integrity of certificate validation processes that rely on name constraints to restrict which domains or email addresses an intermediate CA is permitted to issue certificates for. When a PKIX path builder encounters a certificate issued by such an intermediate CA, it should reject any identity that falls within an excluded subtree defined in the issuer's Basic Constraints extension. However, due to this improper validation logic, if the subject alternative name contains a trailing dot while the exclusion constraint does not, or vice versa depending on implementation specifics of the comparison routine, the validator incorrectly accepts the certificate as valid. This means that entities which should be explicitly blocked from receiving trusted certificates can successfully obtain them and present them in secure communications without triggering validation errors.
The security impact is significant because it allows for potential man-in-the-middle attacks or impersonation scenarios where an attacker utilizes a compromised intermediate CA to issue certificates for domains they are not authorized to represent. By exploiting the mismatch between fully qualified names with trailing dots and their non-qualified counterparts, attackers can bypass organizational policies that rely on strict name constraints to limit certificate issuance scope. This is particularly dangerous in environments where trust anchors are distributed widely, as it erodes the chain of trust established by root CAs and intermediate authorities. The vulnerability affects multiple types of identity fields including email addresses via rfc822Name, DNS names via dNSName, and URI hosts via uniformResourceIdentifier, thereby impacting a broad range of secure communication protocols such as TLS/SSL for web traffic, SMTP for encrypted email, and other services relying on X.509 authentication.
This flaw aligns with CWE-295 Improper Certificate Validation, which covers failures in verifying the authenticity or validity of digital certificates during cryptographic operations. Furthermore, it relates to ATT&CK technique T1648 Supply Chain Compromise, as exploiting this vulnerability requires control over an intermediate CA within a trusted hierarchy, allowing attackers to inject malicious credentials into legitimate trust chains. To mitigate this risk, organizations must ensure that their PKIX validation libraries are updated to version 2.7.0 or later of bc-csharp, where the normalization logic has been corrected to properly handle trailing dots in fully qualified domain names. Additionally, security teams should audit their certificate issuance policies and monitor for any anomalous certificates issued by intermediate CAs that appear to violate established name constraints, ensuring that validation endpoints are robust against such edge-case parsing errors.