When built with wolfSSL, curl can successfully validate a pinned public key hash against a key the TLS peer does not possess. (CVE-2026-87866)
Description
A vulnerability exists in curl when built with wolfSSL where curl can incorrectly validate a pinned public key hash against a key that the TLS peer does not actually possess. This occurs because curl re-parses the TLS certificate and is tricked by a manipulated validity length field to extract and match a different embedded key, leading to incorrect authorization of the pinned public key.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in curl arises when it is compiled with wolfSSL as the TLS backend. During the TLS handshake, wolfSSL correctly validates the connection and certificate. However, curl subsequently re-parses the same certificate and, due to a manipulated validity length field, extracts a different embedded public key than the one validated by wolfSSL. This causes curl to successfully validate a pinned public key hash against a key that the TLS peer does not actually possess, potentially allowing incorrect authorization decisions based on the pinned key.
Potential Impact
This vulnerability could allow an attacker to bypass public key pinning validation in curl when using wolfSSL, potentially enabling unauthorized connections to be accepted as valid. This undermines the security guarantees of public key pinning, which is intended to prevent man-in-the-middle attacks by ensuring the server's public key matches a known pinned key.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should consider avoiding the combination of curl built with wolfSSL for scenarios requiring strict public key pinning validation or use alternative TLS backends if possible.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-wq9f-qmpx-2cc8
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-87866"]
Threat ID: 6ad7ec102cdf04f6566aefaf
Added to database: 10/20/2026, 22:32:48 UTC
Last enriched: 10/20/2026, 22:35:18 UTC
Last updated: 10/20/2026, 22:35:18 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.