WolfSSL wolfSSL X.509 registeredID name constraints enforcement improper input validation vulnerability
wolfSSL silently ignores registeredID entries in a CA's nameConstraints extension, so a certificate with a registeredID SAN outside the permitted OID subtree bypasses constraint enforcement. An attacker can present such a certificate to bypass the CA's intended restrictions.
Originally disclosed on Cisco Talos
A improper input validation vulnerability exists in the X.509 registeredID name constraints enforcement functionality of wolfSSL (version(s): 5.9.1). A specially crafted X.509 certificate chain can lead to bypass registeredID 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
Likely the code that checks name constraints and the code that parses them both omit the registeredID type, so constraints on that type are never stored or enforced.
Impact
An attacker could bypass registeredID name constraints by presenting a certificate with a registeredID SAN outside the CA's permitted subtree, potentially leading to acceptance of an unauthorised certificate.
What the attacker needed
A crafted X.509 certificate chain; a CA that uses registeredID name constraints
The fix
The vendor fixed the issue in a pull request and released the fix in version 5.9.1.
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 what names those certificates are allowed to use. This is called name constraints. wolfSSL fails to check one type of name, called registeredID, so a certificate can use a name the authority never allowed. An attacker could use this to get a certificate accepted that should have been rejected.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.