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

49 results · Clear filters · Feed

  • Medium 6.3

    It was discovered that the sls-logging was not verifying hostnames in TLS certificates due to a misuse of the javax.net…

  • Medium 6.8

    Potentially, SAP Cloud Connector, version - 2.0 communication with the backend is accepted without sufficient validatio…

  • Medium 6.8

    Existing TLS connections can be reused without checking remote hostname

    PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. In version 2.10 and earlier, PJSIP transport can be reused if they have the same IP addres…

  • Medium 4.8

    Disabled Hostname Verification in OpenCast

    Opencast before versions 8.9 and 7.9 disables HTTPS hostname verification of its HTTP client used for a large portion of Opencast's HTTP requests. Hostname verification is an important part when using HTTPS to ensure that the presented certificate is valid fo…

  • Medium 4.2

    The vulnerability have been reported to affect earlier versions of Helpdesk. If exploited, this improper certificate va…

  • Medium 5.3

    Improper Certificate Validation and Improper Validation of Certificate with Host Mismatch in Keycloak

    A flaw was found in Keycloak in versions before 10.0.0, where it does not perform the TLS hostname verification while sending emails using the SMTP server. This flaw allows an attacker to perform a man-in-the-middle (MITM) attack.

  • Medium 5.9

    Improper Validation of Certificate with Host Mismatch in Shibboleth Identity Provider and OpenSAML Java

    The (1) HttpResource and (2) FileBackedHttpResource implementations in Shibboleth Identity Provider (IdP) before 2.4.1 and OpenSAML Java 2.6.2 do not verify that the server hostname matches a domain name in the subject's Common Name (CN) or subjectAltName fie…

  • Medium —

    Improper Validation of Certificate with Host Mismatch in Not Yet Commons SSL

    Certificates.java in Not Yet Commons SSL before 0.3.15 does not properly verify that the server hostname matches a domain name in the subject's Common Name (CN) field of the X.509 certificate, which allows man-in-the-middle attackers to spoof SSL servers via …

  • Medium —

    Improper Validation of Certificates in apache axis

    The getCN function in Apache Axis 1.4 and earlier does not properly verify that the server hostname matches a domain name in the subject's Common Name (CN) or subjectAltName field of the X.509 certificate, which allows man-in-the-middle attackers to spoof SSL…