PHP OpenSSL Peer Verif: CN Fallback Enables Privilege Impersonation
CVE-2026-91769 Published on September 25, 2026
TLS Hostname Verification Falls Back to CN After SAN Mismatch
PHP's OpenSSL stream peer verification checks the certificate's subjectAltName entries first and, whenever no entry matches, falls back to the Common Name. RFC 6125 requires the CN to be ignored once the certificate presents any service identity, so a certificate carrying a non-matching DNS SAN was still accepted when its CN matched the requested peer_name. A certificate trusted by the client for one name can therefore be used to impersonate another.
Vulnerability Analysis
Weakness Type
Improper Validation of Certificate with Host Mismatch
The software communicates with a host that provides a certificate, but the software does not properly ensure that the certificate is actually associated with that host.
Products Associated with CVE-2026-91769
stack.watch emails you whenever new vulnerabilities are published in PHP or Php:php Php. Just hit a watch button to start following.
Affected Versions
PHP Group PHP:- Version 8.2.* and below 8.2.34 is affected.
- Version 8.3.* and below 8.3.35 is affected.
- Version 8.4.* and below 8.4.26 is affected.
- Version 8.5.* and below 8.5.11 is affected.