CWE•Variant•Incomplete•11 recent CVEs
CWE-297Improper Validation of Certificate with Host Mismatch
Description
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.
[object Object]
Common consequences
- Access Control→Gain Privileges or Assume IdentityThe data read from the system vouched for by the certificate may not be from the expected system.
- Authentication,Other→OtherTrust 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,OtherIf 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
Potential mitigations
- Architecture and DesignFully check the hostname of the certificate and provide the user with adequate information about the nature of the problem and how to proceed.
- ImplementationIf certificate pinning is being used, ensure that all relevant properties of the certificate are fully validated before the certificate is pinned, including the hostname.