Wildcard hostname matching accepted in FreeRDP TLS certificate checks
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub.
Summary
FreeRDP through 3.28.0 accepts a wildcard TLS certificate for hostnames with more than one label, so a certificate for *.example.com is accepted for a.b.example.com. The TLS hostname matcher treats the wildcard as matching any hostname ending in the pattern suffix, which violates standard one-label wildcard matching. A client connecting to such a multi-label hostname can accept a trusted wildcard certificate that should not cover it, weakening server authentication, and no memory corruption or code execution is claimed.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Description from the GitHub advisory
## Summary FreeRDP's TLS hostname matcher accepts a wildcard certificate for too broad a set of hostnames. A certificate for *.example.com is accepted for a multi-label hostname such as a.b.example.com. OpenSSL X509_check_host() rejects the same hostname/certificate pair. Reporter / credit: Bin Luo, UESTC ## Confirmed versions - Current master HEAD tested: f3b4347105114fe7453828736bea069999af319f - Supported release checked: 3.28.0 - Relevant files unchanged between 3.28.0 and current master: libfreerdp/crypto/tls.c and libfreerdp/crypto/x509_utils.c ## Affected code path - libfreerdp/crypto/tls.c: tls_match_hostname() - libfreerdp/crypto/tls.c: tls_verify_certificate() - libfreerdp/crypto/x509_utils.c: x509_utils_get_dns_names() ## Root cause tls_match_hostname() treats a wildcard pattern such as *.example.com as matching any hostname that ends in .example.com and has length at least the pattern length. This accepts both: - b.example.com (valid one-label wildcard match) - a.b.example.com (should not match *.example.com) Standard wildcard certificate matching only covers one DNS label unless explicitly allowed otherwise. ## Reproduction evidence I reproduced this in two local Docker/ASan harnesses. ### Matcher-level evidence The harness generates a test certificate with: - CN=*.example.com - DNS SAN: DNS:*.example.com Key result: target=a.b.example.com freerdp_dns[0]=*.example.com len=13 match=1 result host=a.b.example.com freerdp_replica=1 openssl_x509_check_host=0 Controls: - b.example.com: FreeRDP and OpenSSL both accept. - example.com: FreeRDP and OpenSSL both reject. - notexample.com: FreeRDP and OpenSSL both reject. ### Full FreeRDP TLS handshake evidence A second harness installs the wildcard certificate into an isolated FreeRDP certificate store and drives the production FreeRDP TLS client path: - freerdp_tls_connect_ex() - freerdp_tls_handshake() - internal tls_verify_certificate() - internal tls_match_hostname() Key result: case host=b.example.com freerdp_tls_result=0 server_done=1 openssl_x509_check_host=1 case host=a.b.example.com freerdp_tls_result=0 server_done=1 openssl_x509_check_host=0 case host=example.com freerdp_tls_result=3 server_done=1 openssl_x509_check_host=0 freerdp_tls_result=0 is TLS_HANDSHAKE_SUCCESS. freerdp_tls_result=3 is TLS_HANDSHAKE_VERIFY_ERROR. ## Impact This is an improper certificate hostname validation issue. A FreeRDP client connecting to a multi-label hostname could accept a trusted wildcard certificate that should not cover that hostname. This may weaken TLS server authentication under wildcard-certificate conditions. No memory corruption or RCE is claimed. ## Suggested fix When matching DNS wildcard certificates, require the wildcard to cover exactly one DNS label. For example, *.example.com should match b.example.com but not a.b.example.com. I can provide the Docker reproduction harness and generated certificate material if useful.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | FreeRDP (c/c++) | <= 3.28.0 | 3.29.0 | Patch available | GHSA-5wr6-8m8j-3h7f |
- FreeRDP (c/c++) Vendor— Affected <= 3.28.0 Fixed in 3.29.0 Patch available GHSA-5wr6-8m8j-3h7f
Remediation
Upgrade FreeRDP to version 3.29.0 or later, which fixes the issue.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
- Fix · GHSA-5wr6-8m8j-3h7f FreeRDP (c/c++) Fixed in 3.29.0 Advisory →
Timeline
- 2026-11-12 Threatist record created from GHSA-5wr6-8m8j-3h7f
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences