Fix CVE-2014-0139: Prevent wildcard certificates from matching IP addresses#26
Merged
AaronAtDuo merged 1 commit intoduosecurity:masterfrom Aug 12, 2025
Merged
Conversation
jeffreyparker
approved these changes
Aug 6, 2025
AaronAtDuo
approved these changes
Aug 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixed CVE-2014-0139 vulnerability in SSL certificate validation that incorrectly accepted wildcard patterns when validating IP addresses. Enhanced the
_SSL_check_server_cert()function to properly distinguish between hostnames and IP addresses, preventing wildcard certificates from matching IP addresses while maintaining correct validation for legitimate hostname certificates.Motivation and Context
CVE-2014-0139 is a security vulnerability where SSL certificate validation incorrectly accepts wildcard IP addresses in X.509 certificates, allowing potential man-in-the-middle attacks via crafted certificates issued by legitimate Certificate Authorities. This vulnerability was previously fixed in Duo Unix and needed to be addressed in libduo to ensure consistent security across both libraries.
The fix prevents attackers from using wildcard certificates (like
*.example.com) to impersonate services accessed via IP addresses, closing a significant security gap.How Has This Been Tested?
Types of Changes