Skip to content
OpenAdvisories

Weakness (CWE)

CWE-297: Improper Validation of Certificate with Host Mismatch

Variant Incomplete

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.

How to prevent it (3 mitigations)
  1. 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.

  2. 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.

  3. 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-297

103 results · Feed

  • High 7.4

    SSH improper host validation

    When a libcurl-based application performs transfers via `SCP://` or `SFTP://` and utilizes the `CURLOPT_SSH_KEYFUNCTION` callback, it may silently accept an untrusted server. This vulnerability occurs when a server presents a host key type that does not match…

  • High 7.5

    proto-default skips SSH verification

    When a user invokes curl using a schemeless URL combined with `--proto-default` sftp (or scp), a disconnect occurs between the tool layer and libcurl. The tool layer incorrectly infers the URL scheme, which erroneously bypasses the initialization of critical …

  • Low 2.7

    AIOHTTP: TLS Server Hostname Override Is Ignored When Reusing HTTPS Connections

    AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. Prior to 3.14.1, the server_hostname TLS SNI check can be bypassed when an existing connection is reused. If an application makes multiple requests to the same domain, but with di…

  • Medium 5.5

    Improper host validation in the social login autofill feature in Devolutions Remote Desktop Manager 2026.2.8 allows an …

  • High 7.4

    OpenStack oslo.messaging does not verify RabbitMQ broker hostname during TLS handshake

    An issue was discovered in OpenStack oslo.messaging 1.0.0 through 17.3.0. The oslo.messaging RabbitMQ driver does not perform TLS hostname verification when connecting to the message broker. When ssl_ca_file is configured, the driver enables certificate chain…

  • High 8.8

    Apache Directory LDAP API: LDAP client implementation does not verify if the server certificate matches the intended LDAP hostname

    It was identified that the LDAP client implementation in version 2.1.7 does not verify if the server certificate matches the intended LDAP hostname. While the underlying code validates the certificate chain against a trusted authority, the absence of endpoint…

  • High 7.6

    nameConstraints DNS bypass via subject CommonName fallback in public_key hostname verification

    Improper Certificate Validation vulnerability in Erlang OTP public_key (pubkey_cert and public_key modules) allows a DNS nameConstraints bypass via subject CommonName fallback in TLS hostname verification. Two flaws combine to allow a subordinate CA whose DNS…

  • High 7.4

    Claude Desktop: SSH Host Key Verification Bypass Allows Man-in-the-Middle Attack on Remote Sessions

    The Claude Desktop app gives you Claude Code with a graphical interface built for running multiple sessions side by side. From 1.2581.0 to before 1.4304.0, Claude Desktop's SSH remote development feature verified only whether a hostname existed in ~/.ssh/know…

  • High 7.3

    Apache Thrift: TSSLTransportFactory.java hostname verification

    Improper Validation of Certificate with Host Mismatch vulnerability in Apache Thrift. This issue affects Apache Thrift: before 0.23.0. Users are recommended to upgrade to version 0.23.0, which fixes the issue.

  • Medium 6.8
    CVE-2026-22747 Public exploit

    Unauthorized User Impersonation when Using X.509 Client Certificates

    Vulnerability in Spring Spring Security. SubjectX500PrincipalExtractor does not correctly handle certain malformed X.509 certificate CN values, which can lead to reading the wrong value for the username. In a carefully crafted certificate, this can lead to an…

  • Medium 6.3

    Apache Log4j Core: verifyHostName attribute silently ignored in TLS configuration, allowing hostname verification bypass

    The fix for CVE-2025-68161 https://logging.apache.org/security.html#CVE-2025-68161 was incomplete: it addressed hostname verification only when enabled via the log4j2.sslVerifyHostName https://logging.apache.org/log4j/2.x/manual/systemproperties.html#log4j2.s…

  • Medium 5.9

    Apache ZooKeeper: Reverse-DNS fallback enables hostname verification bypass in ZooKeeper ZKTrustManager

    Hostname verification in Apache ZooKeeper ZKTrustManager falls back to reverse DNS (PTR) when IP SAN validation fails, allowing attackers who control or spoof PTR records to impersonate ZooKeeper servers or clients with a valid certificate for the PTR name. I…

  • Medium 5.3

    Apache Ranger: Hostname verification bypass in NiFiRegistryClient

    Hostname verification bypass issue in Apache Ranger NiFiRegistryClient is reported in Apache Ranger versions <= 2.7.0. Users are recommended to upgrade to version 2.8.0, which fixes this issue.

  • High 7.4

    Xiaomi Galaxy FDS Android SDK <= 3.0.8 TLS Hostname Verification Disabled Enables MITM

    Galaxy FDS Android SDK (XiaoMi/galaxy-fds-sdk-android) version 3.0.8 and prior disable TLS hostname verification when HTTPS is enabled (the default configuration). In GalaxyFDSClientImpl.createHttpClient(), the SDK configures Apache HttpClient with SSLSocketF…

  • Medium 5.3

    libssh global known_hosts override

    When doing SSH-based transfers using either SCP or SFTP, and setting the known_hosts file, libcurl could still mistakenly accept connecting to hosts *not present* in the specified file if they were added as recognized in the libssh *global* known_hosts file.

  • Critical 9.1

    Apache Uniffle: Insecure SSL Configuration in Uniffle HTTP Client

    The Uniffle HTTP client is configured to trust all SSL certificates and disables hostname verification by default. This insecure configuration exposes all REST API communication between the Uniffle CLI/client and the Uniffle Coordinator service to potential M…

  • Medium 6.3

    Apache Log4j Core: Missing TLS hostname verification in Socket appender

    The Socket Appender in Apache Log4j Core versions 2.0-beta9 through 2.25.2 does not perform TLS hostname verification of the peer certificate, even when the verifyHostName https://logging.apache.org/log4j/2.x/manual/appenders/network.html#SslConfiguration-att…

  • Medium 6.8

    An Improper Validation of Certificate with Host Mismatch vulnerability [CWE-297] in FortiProxy version 7.6.1 and below,…

  • Critical 9.8
    CVE-2025-46408 Public exploit

    An issue was discovered in the methods push.lite.avtech.com.AvtechLib.GetHttpsResponse and push.lite.avtech.com.Push_Ht…

  • High 7.3

    Host Header Injection in Akinsoft's QR Menu

    Improper Validation of Certificate with Host Mismatch vulnerability in Akınsoft QR Menü allows HTTP Response Splitting. This issue affects QR Menü: from s1.05.05 before v1.05.12.

  • Medium 4.6

    Host Header Injection in HotelRunner's B2B

    Improper Validation of Certificate with Host Mismatch vulnerability in HotelRunner B2B allows HTTP Response Splitting. This issue affects B2B: before 04.06.2025.

  • Medium 4.9

    Couchbase .NET SDK (client library) does not properly enable hostname verification for TLS certificates

    The Couchbase .NET SDK (client library) before 3.7.1 does not properly enable hostname verification for TLS certificates. In fact, the SDK was also using IP addresses instead of hostnames due to a configuration option that was incorrectly enabled by default.

  • Medium 4.4

    A improper validation of certificate with host mismatch in Fortinet FortiClientWindows version 7.4.0, versions 7.2.0 th…

  • Medium 5.7

    JRuby-OpenSSL has hostname verification disabled by default

    JRuby-OpenSSL is an add-on gem for JRuby that emulates the Ruby OpenSSL native library. Starting in JRuby-OpenSSL version 0.12.1 and prior to version 0.15.4 (corresponding to JRuby versions starting in 9.3.4.0 prior to 9.4.12.1 and 10.0.0.0 prior to 10.0.0.1)…

  • High 8.2

    Org.keycloak.protocol.services: keycloak hostname verification

    A flaw was found in Keycloak. By setting a verification policy to 'ALL', the trust store certificate verification is skipped, which is unintended.

  • Medium 4.2

    In JetBrains Toolbox App before 2.6 host key verification was missing in SSH plugin

  • High 8.1

    The mobile application (com.transsnet.store) has a man-in-the-middle attack vulnerability, which may lead to code injec…

  • Medium 6.8

    IBM OpenPages improper certificate validation

    IBM OpenPages with Watson 8.3 and 9.0  could allow a remote attacker to spoof mail server identity when using SSL/TLS security. An attacker could exploit this vulnerability to gain access to sensitive information disclosed through email notifications generate…

  • Medium 5.9

    IBM Storage Defender improper certificate validation

    IBM Storage Defender 2.0.0 through 2.0.7 on-prem defender-sensor-cmd CLI does not validate server name during registration and unregistration operations which could expose sensitive information to an attacker with access to the system.

  • High 7.2

    Client connections using default TLS certificates from OpenEdge may bypass TLS host name validation

    Host name validation for TLS certificates is bypassed when the installed OpenEdge default certificates are used to perform the TLS handshake for a networked connection.  This has been corrected so that default certificates are no longer capable of overriding …

  • Medium 5.9

    Kroxylicious: missing upstream kafka tls hostname verification

    A flaw was found in Kroxylicious. When establishing the connection with the upstream Kafka server using a TLS secured connection, Kroxylicious fails to properly verify the server's hostname, resulting in an insecure connection. For a successful attack to be p…

  • High 7.4

    An issue was discovered in Ada Web Server 20.0. When configured to use SSL (which is not the default setting), the SSL/…

  • High 7.5

    casdoor's use of`ssh.InsecureIgnoreHostKey()` disables host key verification

    An issue discovered in casdoor v1.636.0 allows attackers to obtain sensitive information via the ssh.InsecureIgnoreHostKey() method.

  • Medium 6.8

    Allow attackers to intercept or falsify data exchanges between the client and the server

  • High 7.5

    Bouncy Castle Java Cryptography API vulnerable to DNS poisoning

    An issue was discovered in the Bouncy Castle Crypto Package For Java before BC TLS Java 1.0.19 (ships with BC Java 1.78, BC Java (LTS) 2.73.6) and before BC FIPS TLS Java 1.0.19. When endpoint identification is enabled in the BCJSSE and an SSL socket is creat…

  • Medium 6.5
    CVE-2024-32868 Public exploit

    ZITADEL's Improper Lockout Mechanism Leads to MFA Bypass

    ZITADEL provides users the possibility to use Time-based One-Time-Password (TOTP) and One-Time-Password (OTP) through SMS and Email. While ZITADEL already gives administrators the option to define a `Lockout Policy` with a maximum amount of failed password ch…

  • Medium 6.5

    TLS certificate check bypass with mbedTLS

    libcurl did not check the server certificate of TLS connections done to a host specified as an IP address, when built to use mbedTLS. libcurl would wrongly avoid using the set hostname function when the specified hostname was given as an IP address, therefore…

  • High 7.5

    Improper Validation of Certificate with Host Mismatch in PTC KEPServerEx

    KEPServerEX does not properly validate certificates from clients which may allow unauthenticated users to connect.

  • Medium 5.4

    An improper certificate validation vulnerability [CWE-295] in FortiManager 7.0.1 and below, 6.4.6 and below; FortiAnaly…

  • Medium 5.6

    Improper Validation of Certificate Vulnerability in Hitachi Device Manager

    Improper Validation of Certificate with Host Mismatch vulnerability in Hitachi Device Manager on Windows, Linux (Device Manager Server, Device Manager Agent, Host Data Collector components) allows Man in the Middle Attack.This issue affects Hitachi Device Man…