HexBrain

Internet Bug Bounty · Report #1991427

CVE-2023-28321: IDN wildcard match

Validstatus
lowseverity
4upvotes
25 Jun 2023disclosed

Summary

CVE-2023-28321 - IDN wildcard match VULNERABILITY curl supports matching of wildcard patterns when listed as "Subject Alternative Name" in TLS server certificates. curl can be built to use its own name matching function for TLS rather than one provided by a TLS library. This private wildcard matching function would match IDN (International Domain Name) hosts incorrectly and could as a result accept patterns that otherwise should mismatch.

IDN hostnames are converted to puny code before used for certificate checks. Puny coded names always start with xn-- and should not be allowed to pattern match, but the wildcard check in curl could still check for x*, which would match even though the IDN name most likely contained nothing even resembling an x.

SOLUTION curl 8.1.0 completely removes the support for "partial" patches and now only supports .. No a, a*b or *b matches. For all host names, IDN or not.

Fixed-in: https://github.com/curl/curl/commit/199f2d440d8659b42

TIMELINE This issue was reported to the curl project on April 17 2023. We contacted distros @ openwall on May 9, 2023.

curl 8.1.0 was released on May 17 2023, coordinated with the publication of this advisory.

CREDITS Reported-by: Hiroki Kurosawa Patched-by: Daniel Stenberg

Link to full Security Advisory: https://curl.se/docs/CVE-2023-28321.html

How it was found

Original Report:https://hackerone.com/reports/1950627

Impact

Improper Validation of Certificate with Host Mismatch.

This report was disclosed publicly on HackerOne and belongs to its author and the program. See the original