Skip to main content
EPSS 0.2%top 87%

CVE-2026-63577: CWE-295 Improper Certificate Validation in Legion of the Bouncy Castle Inc. bc-csharp

0
High
VulnerabilityCVE-2026-63577cvecve-2026-63577cwe-295
Published: 10/02/2026 (10/02/2026, 07:07:35 UTC)
Source: CVE Database V5
Vendor/Project: Legion of the Bouncy Castle Inc.
Product: bc-csharp

Description

Improper certificate validation in the directoryName name-constraint check (PkixNameConstraintValidator.WithinDNSubtree) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows an attacker who controls, or can have certificates issued by, a name-constrained intermediate CA to get certificates accepted by PKIX path validation whose subject distinguished name, or a directoryName subjectAltName, lies outside the CA's permitted subtrees, via a name that places other RDNs ahead of a copy of the permitted RDN sequence, because the check looks for the constraint's first RDN anywhere in the name and compares the remaining RDNs from that position, instead of requiring the constraint to be an initial prefix of the name as RFC 5280 sections 4.2.1.10 and 7.1 require.

CVSS v4.0

Score 8.2high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
High
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

Legion of the Bouncy Castle Inc.

bc-csharp

Affected versions
>=0 <2.7.0
BouncyCastle.Cryptography
pkg:nuget/BouncyCastle.Cryptography
Affected versions
>=0 <2.7.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/02/2026, 07:46:07 UTC

Technical Analysis

The vulnerability in bc-csharp before 2.7.0 arises from an incorrect implementation of the directoryName name-constraint check in the PkixNameConstraintValidator.WithinDNSubtree function. Specifically, the check looks for the constraint's first RDN anywhere within the subject name and compares subsequent RDNs from that position. RFC 5280 mandates that the name constraint must be an initial prefix of the subject name. This flaw allows an attacker who controls or can obtain certificates from a name-constrained intermediate CA to present certificates with subject distinguished names or directoryName subjectAltNames outside the permitted subtrees, bypassing PKIX path validation.

Potential Impact

This vulnerability can allow an attacker with control over a name-constrained intermediate CA, or the ability to have certificates issued by such a CA, to have certificates accepted by PKIX path validation even if the subject names lie outside the CA's permitted subtrees. This undermines the trust model of certificate validation and can lead to acceptance of unauthorized certificates, potentially enabling man-in-the-middle or impersonation attacks in systems relying on bc-csharp for certificate validation.

Mitigation Recommendations

A fix is available in bc-csharp version 2.7.0. Users should upgrade to version 2.7.0 or later to address this improper certificate validation vulnerability. No other mitigation or temporary workaround is indicated in the available data.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
bcorg
Date Reserved
2026-07-16T23:51:51.306Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6abf5de7a43b0b3b8988eab1

Added to database: 10/02/2026, 07:31:51 UTC

Last enriched: 10/02/2026, 07:46:07 UTC

Last updated: 10/02/2026, 21:45:56 UTC

Views: 16

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses