WolfSSL wolfSSL X.509 iPAddress name constraints enforcement improper input validation vulnerability
wolfSSL's X.509 certificate validation silently skips IP address subject alternative names when built without the WOLFSSL_IP_ALT_NAME flag, so name constraints on iPAddress are not enforced. An attacker can present a certificate with an IP SAN outside the CA's permitted range and it will be accepted as valid.
Originally disclosed on Cisco Talos
A improper input validation vulnerability exists in the X.509 iPAddress name constraints enforcement functionality of wolfSSL (version(s): 5.9.1). A specially crafted X.509 certificate chain can lead to bypass of iPAddress name constraints.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The code that parses IP address subject alternative names is compiled out unless WOLFSSL_IP_ALT_NAME is defined, so the name constraint checker never sees those entries and treats them as valid.
Impact
A certificate with an IP SAN outside the CA's permitted range is accepted as valid, potentially allowing an attacker to impersonate a service at a forbidden IP address.
What the attacker needed
WolfSSL built without --enable-ip-alt-name; attacker can present a crafted certificate chain
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a certificate authority issues certificates, it can restrict which IP addresses those certificates are allowed to represent. This is called a name constraint. wolfSSL, a TLS library, fails to check these IP address restrictions in its default build, so a certificate for a forbidden IP address is accepted as if it were legitimate.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.