1. CVE archive
  2. Vulnerability types
  3. CWE-297
CWE-297 · #210 most frequent type in the archive

Improper Validation of Certificate with Host Mismatch

The product communicates with a host that provides a certificate, but the product does not properly ensure that the certificate is actually associated with that host.

Part of: CWE-923 · Improper Restriction of Communication Channel to Intended Endpoints

71CVEs of this type in the archive
6critical (CVSS ≥ 9)
31high severity (7–8.9)
Dec 2, 2026latest published

What it is

The product communicates with a host that provides a certificate, but the product does not properly ensure that the certificate is actually associated with that host.

Impact on systems

ScopeImpact
Access Control Gain Privileges or Assume Identity
The data read from the system vouched for by the certificate may not be from the expected system.
Authentication, Other Other
Trust afforded to the system in question - based on the malicious certificate - may allow for spoofing or redirection attacks.
Access Control, Other Gain Privileges or Assume Identity, Other
If the certificate's host-specific data is not properly checked - such as the Common Name (CN) in the Subject or the Subject Alternative Name (SAN) extension of an X.509 certificate - it may be possible for a redirection or spoofing attack to allow a malicious host with a valid certificate to provide data, impersonating a trusted host.

How to prevent it

Architecture and Design In order to ensure data integrity, the certificate must be valid, and it must pertain to the site that is being accessed.Fully check the hostname of the certificate and provide the user with adequate information about the nature of the problem and how to proceed.
Implementation If certificate pinning is being used, ensure that all relevant properties of the certificate are fully validated before the certificate is pinned, including the hostname.
Implementation Be careful of other weaknesses in the code that checks the hostname, since it is still possible to incorrectly check the hostname. For example, attackers could create a certificate with a name that begins with a trusted name followed by a NUL byte, which could cause some string-based comparisons to only examine the portion that contains the trusted name.

Source: MITRE CWE catalog · Official entry on the MITRE website

CWE-297 CVEs published per year

2026: year in progress, updated every hour

Show the data as a table
YearCVE
20141
20161
20172
20181
20191
20211
20231
20244
202510
202650

All CWE-297 CVEs

72 results

Dottor Marc

Is this type of vulnerability in your systems?

An archive tells you what exists; a Vulnerability Assessment tells you what is exposed on your side. Dottor Marc tests your web applications and network with automated and manual checks.