An improper certificate validation vulnerability exists in curl <v8.1.0inthewayitsupportsmatchingofwildcardpatternswhenlistedas"SubjectAlternativeName"inTLSservercertificates.curlcanbebuilttouseitsownnamematchingfunctionforTLSratherthanoneprovidedbyaTLSlibrary.ThisprivatewildcardmatchingfunctionwouldmatchIDN(InternationalDomainName)hostsincorrectlyandcouldasaresultacceptpatternsthatotherwiseshouldmismatch.IDNhostnamesareconvertedtopunycodebeforeusedforcertificatechecks.Punycodednamesalwaysstartwith`xn--`andshouldnotbeallowedtopatternmatch,butthewildcardcheckincurlcouldstillcheckfor`x*`,whichwouldmatcheventhoughtheIDNnamemostlikelycontainednothingevenresemblingan`x`.