CVE-2026-87866: wolfSSL public-key pinning bypass
When built with wolfSSL, curl can successfully validate a pinned public key hash against a key the TLS peer does not possess. During the TLS handshake, wolfSSL validates the connection, but curl's subsequent re-parsing of the same certificate - tricked by a manipulated validity length field - extracts and matches a different embedded key, incorrectly authorizing the pinned public key.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
alpine/curlto a version that resolves this vulnerability.Fixed in 8.23.0-r0 - Upgrade
Upgrade
debian/curlto a version that resolves this vulnerability.Fixed in 8.23.0-1
Event History
Frequently Asked Questions
Which deployments are exposed?
Deployments using curl built with wolfSSL are affected when they rely on pinned public-key hashes for TLS peer authorization. The issue concerns curl's pinning check after wolfSSL has validated the TLS connection.
What must an attacker control to exploit the issue?
The attacker must be able to present a TLS certificate with a manipulated validity length field. This can cause curl's certificate re-parsing to extract a different embedded key that matches the configured pin, even though the TLS peer does not possess that key.