Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-63576 Overview
CVE-2026-63576 is an improper certificate validation flaw [CWE-295] in the Legion of the Bouncy Castle bc-csharp library before version 2.7.0. The defect resides in PkixNameConstraintValidator.ExtractHostFromURL, which extracts the host portion of a Uniform Resource Identifier (URI) using naive string slicing instead of parsing the RFC 3986 authority component. A name-constrained subordinate certificate authority (CA), or any party able to obtain certificates with chosen subjectAltName URIs from such a CA, can craft URIs whose userinfo, path, query, or fragment contain @ or : characters. The host validated against the name constraints then differs from the URI's actual host, defeating uniformResourceIdentifier permitted and excluded constraints during path validation.
Critical Impact
Attackers can bypass uniformResourceIdentifier name constraints on subordinate CAs, enabling issuance and acceptance of certificates for domains outside the authorized scope.
Affected Products
- Legion of the Bouncy Castle bc-csharp versions prior to 2.7.0
- Applications performing PKIX certification path validation with name constraints via PkixNameConstraintValidator
- Downstream .NET libraries and services that embed vulnerable bc-csharp builds
Discovery Timeline
- 2026-10-02 - CVE-2026-63576 published to the National Vulnerability Database (NVD)
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-63576
Vulnerability Analysis
The vulnerability affects the PKIX name constraints validator in bc-csharp, a component responsible for enforcing restrictions placed on subordinate CAs during X.509 certification path validation. Name constraints are the primary mechanism that allows a parent CA to delegate issuance authority to a subordinate CA while limiting it to specific name spaces, such as a set of domains or URI patterns. The flaw breaks that guarantee for the uniformResourceIdentifier general name type. Because ExtractHostFromURL does not isolate the RFC 3986 authority before splitting, a crafted URI can present one host to the validator and a different effective host to any downstream consumer. The impact is integrity-focused: certificates that should be rejected are accepted, enabling spoofing of resources that rely on URI-based trust decisions.
Root Cause
The root cause is incorrect URI parsing in PkixNameConstraintValidator.ExtractHostFromURL. The function identifies the host via character-based slicing instead of first delimiting the authority component as defined in RFC 3986. User-controlled characters such as @ (which separates userinfo from host) and : (which separates host from port, or appears in scheme and path contexts) shift the slice boundary. The validator therefore compares the wrong substring against permitted and excluded name constraints.
Attack Vector
An attacker who controls a name-constrained subordinate CA, or who can request end-entity certificates from one, embeds a subjectAltName extension containing a crafted uniformResourceIdentifier. The URI is shaped so that ExtractHostFromURL returns a host within the permitted name space, while the true authority points to a domain outside it. Relying parties using bc-csharp accept the certificate as valid, enabling impersonation of services the subordinate CA was never authorized to vouch for. The attack is remote, requires no privileges on the target, and no user interaction.
No verified proof-of-concept code is published. Refer to the GitHub CVE-2026-63576 Documentation and the upstream commit for implementation details.
Detect Identity Attacks the Moment Authentication Fails
Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.
Stop Identity AttacksDetection Methods for CVE-2026-63576
Indicators of Compromise
- Issued or presented certificates whose subjectAltName URI entries contain @ or : characters in the userinfo, path, query, or fragment components.
- X.509 chains where a subordinate CA bearing nameConstraints issues leaf certificates for authorities outside its permitted URI space.
- TLS or signature-verification sessions that terminate on hosts not matching any permitted uniformResourceIdentifier constraint when parsed per RFC 3986.
Detection Strategies
- Inventory .NET applications and dependencies to identify bc-csharp builds older than 2.7.0 via software composition analysis.
- Audit certificate stores and CA logs for subordinate CAs that assert uniformResourceIdentifier name constraints, then re-validate issued leaves with an RFC 3986-compliant parser.
- Compare the host extracted by legacy ExtractHostFromURL logic against a conformant parser; divergence indicates a candidate exploit certificate.
Monitoring Recommendations
- Alert on certificate validation events where the validated host does not match the host consumed by the application layer.
- Monitor Certificate Transparency logs for leaves issued under constrained subordinate CAs that contain unusual URI SAN syntax.
- Capture and retain full X.509 chains in centralized logging to support retrospective analysis once a conformant validator is deployed.
How to Mitigate CVE-2026-63576
Immediate Actions Required
- Upgrade bc-csharp to version 2.7.0 or later in all .NET projects, container images, and build pipelines.
- Rebuild and redeploy applications that statically link or vendor the Bouncy Castle C# library.
- Review trust stores and remove or re-scope any subordinate CAs that are unnecessary or over-privileged.
Patch Information
The fix was committed upstream and is included in bc-csharp 2.7.0. See the GitHub Commit Update for the corrected URI authority parsing logic and the GitHub CVE-2026-63576 Documentation for vendor guidance.
Workarounds
- If immediate upgrade is not possible, avoid reliance on uniformResourceIdentifier name constraints and prefer dNSName or directoryName constraints that are correctly enforced.
- Perform an independent RFC 3986 authority parse of each SAN URI before accepting a chain, and reject certificates whose extracted host differs from the parsed authority.
- Reduce the attack surface by minimizing the set of trusted subordinate CAs capable of issuing certificates with URI SANs.
# Update bc-csharp via NuGet to the fixed release
dotnet add package BouncyCastle.Cryptography --version 2.7.0
dotnet restore
dotnet build --no-incremental
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

