What’s Vulnerable › Vulnerabilities
CVE-2023-52892: Name confusion in x509 Subject Alternative Name fields
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2024-06-27 · updated 2026-06-17
- Weakness: CWE-436
Description
In phpseclib before 1.0.22, 2.x before 2.0.46, and 3.x before 3.0.33, some characters in Subject Alternative Name fields in TLS certificates are incorrectly allowed to have a special meaning in regular expressions (such as a + wildcard), leading to name confusion in X.509 certificate host verification.
Affected products
- phpseclib: from 1.0.0 before 1.0.22; from 2.0.0 before 2.0.46; from 3.0.0 before 3.0.33 — fixed in 1.0.22, 2.0.46, 3.0.33
- Packagist Phpseclib/Phpseclib: before 1.0.22; from 2.0.0 before 2.0.46; from 3.0.0 before 3.0.33; 0.3.0, 0.3.1, 0.3.10, 0.3.5, 0.3.6, 0.3.7 (+94) — fixed in 1.0.22, 2.0.46, 3.0.33
How to fix
Upgrade to a fixed version: phpseclib 1.0.22, 2.0.46, 3.0.33; Packagist Phpseclib/Phpseclib 1.0.22, 2.0.46, 3.0.33. Check the vendor advisory for mitigations.
References
- https://github.com/phpseclib/phpseclib/commit/6cd6e8ceab9f2b55c8cd81d2192bf98cbeaf4627
- https://github.com/phpseclib/phpseclib/issues/1943
- https://github.com/phpseclib/phpseclib/releases/tag/3.0.33
- https://github.com/x509-name-testing/name_testing_artifacts
- https://github.com/phpseclib/phpseclib/commit/6cd6e8ceab9f2b55c8cd81d2192bf98cbeaf4627
- https://github.com/phpseclib/phpseclib/issues/1943
- https://github.com/phpseclib/phpseclib/releases/tag/3.0.33
- https://github.com/x509-name-testing/name_testing_artifacts
Get alerted when CVE-2023-52892 or the next vulnerability affects your stack