TLS host impersonation via unescaped SAN metacharacters
Published Jun 27, 2024 · Updated Aug 21, 2024
X.509 hostname verification in phpseclib before 1.0.22, 2.x before 2.0.46, and 3.x before 3.0.33 allows remote attackers to impersonate TLS hosts. The validateURL method converted each Subject Alternative Name into a regular expression after escaping only periods and translating asterisks, leaving metacharacters such as plus signs active. Exploitation requires an application to validate an attacker-presented certificate with this method; an accepted hostname mismatch can expose TLS-protected data.
Summary
What happened
X.509 hostname verification in phpseclib before 1.0.22, 2.x before 2.0.46, and 3.x before 3.0.33 allows remote attackers to impersonate TLS hosts. The validateURL method converted each Subject Alternative Name into a regular expression after escaping only periods and translating asterisks, leaving metacharacters such as plus signs active. Exploitation requires an application to validate an attacker-presented certificate with this method; an accepted hostname mismatch can expose TLS-protected data.
The record
- CVE
- CVE-2023-52892
- Published
- Jun 27, 2024
- Updated
- Aug 21, 2024
- Vendor
- phpseclib
- Product
- phpseclib
- Classifications
- CWE-436
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Jun 27, 2024CVE publishedPublication date reported by the CVE source.
- Aug 21, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0 <1.0.22
- Affected versionversion=2.0 <2.0.46
- Affected versionversion=3.0 <3.0.33
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- X.509 hostname confusion proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo