Security Vulnerability Report
中文
CVE-2026-5194 CVSS 9.1 CRITICAL

CVE-2026-5194

Published: 2026-04-09 20:16:28
Last Modified: 2026-04-16 20:37:11

Description

Missing hash/digest size and OID checks allow digests smaller than allowed when verifying ECDSA certificates, or smaller than is appropriate for the relevant key type, to be accepted by signature verification functions. This could lead to reduced security of ECDSA certificate-based authentication if the public CA key used is also known. This affects ECDSA/ECC verification when EdDSA or ML-DSA is also enabled.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:wolfssl:wolfssl:*:*:*:*:*:*:*:* - VULNERABLE
wolfSSL (修复前的特定版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ Conceptual PoC for CVE-2026-5194 This script demonstrates the logic flaw where a short digest is accepted. In a vulnerable version of wolfSSL, if EdDSA/ML-DSA is enabled, checks for ECDSA digest size might be skipped. """ def verify_ecdsa_vulnerable(data, signature, public_key): # Simulate the vulnerable logic # Vulnerability: Missing check for hash size and OID # Extract digest length from the (potentially malformed) signature digest_len = len(data) # Simulating accepting arbitrary data length as digest print(f"[VULNERABLE] Verifying signature with data length: {digest_len}") # In the vulnerable code, if EdDSA is enabled, it might skip: # if (digest_len < MIN_ECDSA_DIGEST_SIZE) return ERROR; # Accepting the signature regardless of the digest size being too small if signature == "valid_signature_structure": # Simplified check return True return False def verify_ecdsa_secure(data, signature, public_key): # Simulate the secure logic MIN_ECDSA_DIGEST_SIZE = 32 # Example for P-256 digest_len = len(data) print(f"[SECURE] Verifying signature with data length: {digest_len}") if digest_len < MIN_ECDSA_DIGEST_SIZE: print(f"[SECURE] Rejected: Digest size {digest_len} is too small.") return False if signature == "valid_signature_structure": return True return False # Scenario: Attacker provides a short digest (e.g., 16 bytes instead of 32) short_data = "A" * 16 sig = "valid_signature_structure" pubkey = "mock_public_key" print("--- Testing Vulnerable Implementation ---") result_vuln = verify_ecdsa_vulnerable(short_data, sig, pubkey) print(f"Result: {result_vuln}\n") print("--- Testing Secure Implementation ---") result_sec = verify_ecdsa_secure(short_data, sig, pubkey) print(f"Result: {result_sec}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-5194", "sourceIdentifier": "[email protected]", "published": "2026-04-09T20:16:28.420", "lastModified": "2026-04-16T20:37:11.433", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Missing hash/digest size and OID checks allow digests smaller than allowed when verifying ECDSA certificates, or smaller than is appropriate for the relevant key type, to be accepted by signature verification functions. This could lead to reduced security of ECDSA certificate-based authentication if the public CA key used is also known. This affects ECDSA/ECC verification when EdDSA or ML-DSA is also enabled."}], "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:L/SC:H/SI:L/SA:L/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:Red", "baseScore": 9.3, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "LOW", "subConfidentialityImpact": "HIGH", "subIntegrityImpact": "LOW", "subAvailabilityImpact": "LOW", "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": "RED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N", "baseScore": 9.1, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "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:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.12.0", "versionEndExcluding": "5.9.1", "matchCriteriaId": "4C017AA9-210C-4181-87AF-18EBC88FF785"}]}]}], "references": [{"url": "https://github.com/wolfSSL/wolfssl/pull/10131", "source": "[email protected]", "tags": ["Issue Tracking"]}]}}