libgnutls in GnuTLS before 2.8.2 does not properly handle a \'\0\' character in a domain name in the subject\'s (1) Common Name (CN) or (2) Subject Alternative Name (SAN) field of an X.509 certificate, which allows man-in-the-middle attackers to spoof arbitrary SSL servers via a crafted certificate issued by a legitimate Certification Authority.