HSEC-2026-0016: Improper IP address validation in validateCertificateName

Published Nov 17, 2026
·
Updated

Improper IP address validation in validateCertificateName

Data.X509.Validation.getNames extracts only AltNameDNS entries from the subjectAltName extension (Data/X509/Validation.hs, unAltName, ~L512–515 in crypton-x509-validation 1.10.1). When a certificate carries an iPAddress SAN but no dNSName SAN, the extracted name list is empty, so validateNames (~L569–580) falls through to the commonName branch as if no SAN extension existed, even though the extension's haddock promises that the commonName is ignored whenever subjectAltName is present. Consequently, when a client connects to an IP literal:

a certificate with CN = <target IP> but iPAddress SAN pointing to a different host is accepted; a certificate whose only valid identity is a matching iPAddress SAN is rejected.

Exploitation requires a certificate from a CA the client trusts that has a commonName different from its iPAddress SAN (public CAs are barred from this by the CA/Browser Forum Baseline Requirements, but private or enterprise CAs can issue such certificates). A successful impersonation exposes and can modify the protected connection.

The draft fix makes getNames distinguish "no SAN extension" from "SAN extension present with no DNS names" and applies SAN semantics (including the existing iPAddress comparison) whenever the extension is present, restoring the documented SAN-supersedes-CN behavior in line with RFC 9525. No fixed release is published at the time of writing (1.10.1 is the latest release and still vulnerable).

Credits

Reported by Dickson Wu (SEAL & CertiK). Validated and fixed by Kazu Yamamoto.

Affected Software

1 affected componentFixes available
hackage/crypton-x509-validation>=1.6.12<1.10.2
1.10.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade hackage/crypton-x509-validation to a version that resolves this vulnerability.

    Fixed in 1.10.2

Event History

Nov 17, 2026
Advisory Published
via OSV·09:58 AM
Data Sourced
via OSV·09:58 AM
DescriptionSeverityAffected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203