Permissive Regular Expression in phpseclib - #VU168998
Published: November 21, 2026
Vulnerability details
The vulnerability allows a remote attacker to bypass certificate hostname verification and impersonate a host they do not control in applications that rely on the check.
The vulnerability exists due to a permissive regular expression in phpseclib's X509::validateURL() when a certificate lacks a subjectAltName extension and its commonName is converted into a pattern without escaping all regex metacharacters. A remote attacker can present a certificate signed by a CA the application trusts with regex metacharacters in its commonName to make the hostname check accept a host they do not control.