/

CVE-2026-89134

Severity:

CRITICAL RISK

(9.1)

Improper Certificate Validation (CWE-295) in wolfSSL

CVE-2026-89134

Analyzed

Vulnerability type

Category:

Improper Certificate Validation

CWE:

CWE-295

Impact:

Certificate Validation Bypass

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A certificate name-constraint validation flaw in wolfSSL can accept an out-of-scope Subject Common Name (CN) when the certificate contains a SAN of another type but no dNSName SAN. In affected validation contexts, an attacker may use such a certificate to bypass DNS name constraints, potentially enabling unauthorized TLS identity or certificate-chain acceptance.

Affected context

The issue occurs in wolfSSL certificate validation when DNS name constraints are applied to a certificate that has a Subject CN and one or more non-dNSName SAN entries, such as an IP address or registered identifier. The affected logic may incorrectly treat the presence of any SAN as sufficient to suppress CN-based DNS validation, even though no dNSName SAN is present.

Exploit preconditions

  • Attack surface: TLS or certificate-chain validation performed by wolfSSL
  • Required access: Ability to present or cause acceptance of a certificate during a validated connection or chain-processing operation
  • Trigger point: Name-constraint evaluation for a certificate containing a Subject CN and SAN entries without a dNSName SAN
  • Why exploitation is possible: The fallback check for the CN is gated on the absence of all SAN entries rather than the absence of a dNSName SAN, allowing an out-of-scope DNS CN to avoid the intended constraint check

Why this happens

The underlying bug is incomplete certificate identity validation. The implementation uses the presence of any subject alternative name as a reason to skip the Subject CN-as-DNS fallback, instead of determining whether a dNSName SAN specifically exists. As a result, certificates with unrelated SAN types can bypass the applicable DNS name-constraint check. This behavior maps to CWE-295, Improper Certificate Validation, because certificate identity and authorization constraints are not enforced consistently across supported name representations.

Potential impact

  • An attacker could cause an out-of-scope certificate identity to be accepted.
  • TLS clients or services could establish trust in an unauthorized endpoint.
  • Certificate-based authorization decisions may be bypassed.
  • Systems relying on DNS name constraints could experience impersonation or

trust-boundary violations.

General mitigation guidance

Mitigation generally focuses on making certificate identity validation

type-aware and fail-closed.

Common defensive patterns include:

  • Applying CN fallback validation when no dNSName SAN exists, regardless of other SAN types.
  • Enforcing name constraints independently for each supported identity type.
  • Rejecting ambiguous or unsupported certificate identity combinations when policy requires strict DNS validation.
  • Limiting certificate trust and authorization decisions to explicitly permitted names and issuers.
  • Running certificate-processing components with least privilege to reduce consequences if trust decisions are bypassed.

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis and code review of branches that test for any SAN versus a specific SAN type.
  • Tests covering certificates with a Subject CN plus iPAddress, registeredID, or other non-dNSName SAN entries.
  • Negative validation tests confirming that out-of-scope CN values remain constrained when no dNSName SAN is present.
  • Policy checks requiring certificate validators to process every applicable identity representation independently.
  • Automated security review tools that flag incomplete certificate-name validation logic.

Sources

SourceLink
github.comgithub.com/wolfSSL/wolfssl/pull/10837

Frequently asked

questions

It may be exploitable through a network interaction when a vulnerable wolfSSL

component validates attacker-controlled or externally supplied certificates

under name constraints. Exploitability depends on the application's trust

model and certificate-validation configuration.

An attacker generally needs to present a crafted certificate during a TLS

connection or another certificate-processing operation. They do not

necessarily need local access to the validating host.

Ensure that name constraints are evaluated based on the presence or absence of

a dNSName SAN specifically, while also validating the Subject CN fallback when

appropriate. Certificate validation should fail closed for ambiguous identity

representations.

Maintain comprehensive tests for mixed SAN types, review certificate logic by

identity type, and enforce policies that require strict hostname and

name-constraint validation across all supported certificate representations.

Find out what's already
exploitable in your codebase.