CVE-2026-87866

wolfSSL public-key pinning bypass

Published Oct 20, 2026 CVSS 3.1 · 9.1 Critical EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

When curl is compiled with the wolfSSL backend, the client may validate a pinned public key hash against a key that the TLS peer does not actually present. During the TLS handshake, wolfSSL performs standard validation, but curl subsequently re‑parses the same certificate. A crafted certificate containing a manipulated validity length field causes curl to extract a different embedded key, which then matches the pinned key hash, leading the client to incorrectly authorize the pin. The consequence is that an attacker can impersonate a legitimate server, enabling man‑in‑the‑middle attacks and data manipulation. This weakness is a CWE‑295 authentication flaw involving certificate validation.

Affected Systems

The affected product is the open‑source curl client when compiled with the wolfSSL backend. No specific version ranges are provided in the advisory, so all builds that include the wolfSSL backend and have the certificate parsing bug are potentially vulnerable. The vulnerability applies to any system that connects to a malicious server using this configuration.

Risk and Exploitability

The CVSS score of 9.1 indicates a high overall severity, and the EPSS score is < 1%. The flaw is not listed in the CISA KEV catalog. The likely attack vector is remote, accessed by a malicious server that presents a crafted certificate to a curl client over an insecure network. An attacker would need to control the server side or compromise a target host that connects to the malicious server; the exploitation does not require local code execution or elevated privileges on the client. Because the vulnerability exploits a certificate parsing bug, success hinges on the client performing the TLS handshake with a modified validity field.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to a curl version where the wolfSSL backend certificate parsing bug is fixed; consult the vendor’s release notes to confirm the fix.
  • If upgrading is not possible immediately, disable or remove public key pinning for connections that use the wolfSSL backend, or enforce strict certificate validation using alternative libraries or backends.
  • Monitor outbound TLS traffic for abnormal handshake patterns and flag certificates with unusually long or conflicting validity periods.

Generated by OpenCVE AI on October 29, 2026 at 21:09 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N'}

cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'}

Type Values Removed Values Added
Description A flaw was found in curl. This vulnerability allows a malicious server to bypass public key pinning when curl is built with the wolfSSL backend. By presenting a specially crafted certificate with a manipulated validity length field, the attacker can trick curl into improperly re-parsing the certificate and authorizing an invalid key during the Transport Layer Security (TLS) handshake. 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.
Title curl: curl: wolfSSL public-key pinning bypass wolfSSL public-key pinning bypass
References
Type Values Removed Values Added
First Time appeared Curl
Curl curl
Vendors & Products Curl
Curl curl
Type Values Removed Values Added
Description A flaw was found in curl. This vulnerability allows a malicious server to bypass public key pinning when curl is built with the wolfSSL backend. By presenting a specially crafted certificate with a manipulated validity length field, the attacker can trick curl into improperly re-parsing the certificate and authorizing an invalid key during the Transport Layer Security (TLS) handshake.
Title curl: curl: wolfSSL public-key pinning bypass
Weaknesses CWE-295
References
Metrics threat_severity

None

cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N'}

threat_severity

Low

Weaknesses
  • CWE-295

    Improper Certificate Validation

Sources

Status
PUBLISHED
Assigner
curl
Published
Updated
Oct 29, 2026, 6:59 PM
Reserved
Sep 9, 2026, 1:17 PM
Status
Awaiting Analysis
Published
Oct 20, 2026, 9:17 PM
Modified
Oct 29, 2026, 7:17 PM
Severity
Low
Public date
Oct 14, 2026, 12:00 PM