☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-30356

CVE-2025-30356 Buffer Overflow in Cryptolib
📅 PUBLISHED: 2025-04-01 22:06 UTC 🔄 UPDATED: 2026-10-09 05:41 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.66%
👁️
0.66% probability
16.4× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
9.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-30356 is a critical heap buffer overflow vulnerability in CryptoLib, a software library implementing the CCSDS Space Data Link Security Protocol - Extended Procedures (SDLS-EP) for securing communications between spacecraft running the core Flight System (cFS) and ground stations. The vulnerability resides in the Crypto_TC_ApplySecurity function, where an incomplete validation of the fl (frame length) field allows an attacker to craft malicious frames that cause a negative tf_payload_len value. This negative value is then interpreted as a large unsigned integer, leading to a heap buffer overflow during a memcpy operation. The vulnerability affects versions 1.3.3 and earlier. Although a previous CVE (CVE-2025-29912) addressed an underflow issue involving fl, the patch was insufficient, leaving the door open for this more severe overflow. The CVSS score is 0.0 in the NVD data, but based on the technical details, this is a critical vulnerability with high impact on confidentiality, integrity, and availability. No public exploit code or PoC is available at this time.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

CryptoLib is a critical component in the space communications supply chain, used in NASA's cFS ecosystem. A vulnerability in this library can compromise the security of satellite communications, telemetry, and command links. Organizations using cFS with CryptoLib must treat this as a high-priority supply chain risk. The lack of a patch and the incomplete fix for CVE-2025-29912 indicate a systemic issue in the library's input validation logic.

CVSS Breakdown & Threat Level

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Base Score: 9.8 (Critical)

  • Attack Vector (AV): Network – The vulnerability can be exploited remotely over the network.
  • Attack Complexity (AC): Low – No special conditions are required; the attacker only needs to send a malicious frame.
  • Privileges Required (PR): None – No authentication is needed.
  • User Interaction (UI): None – No user action is required.
  • Scope (S): Unchanged – The exploit does not affect other components.
  • Confidentiality (C): High – Memory corruption can leak sensitive data.
  • Integrity (I): High – An attacker can corrupt memory and alter data.
  • Availability (A): High – Heap overflow can cause crashes or denial of service.

Threat Level: Critical. The vulnerability is remotely exploitable with low complexity and no privileges, making it a prime target for attackers targeting space systems.

Deep Dive & Mechanics

The vulnerability is in the Crypto_TC_ApplySecurity function, which processes telecommand (TC) frames. The function parses the frame header to extract the fl (frame length) field. The previous fix for CVE-2025-29912 attempted to prevent an underflow when calculating tf_payload_len by checking if fl is less than a certain value. However, the check was incomplete.

The vulnerable code path:

  1. The function reads the fl field from the incoming frame.
  2. It calculates tf_payload_len as fl - header_size - security_overhead.
  3. If fl is crafted to be smaller than header_size + security_overhead, the result is negative.
  4. The code does not properly validate that tf_payload_len is non-negative before using it in a memcpy call.
  5. When tf_payload_len is negative, it is implicitly cast to an unsigned integer (size_t), resulting in a very large positive value (e.g., -1 becomes 0xFFFFFFFFFFFFFFFF on 64-bit systems).
  6. This large value is passed to memcpy, causing a heap buffer overflow as the function attempts to copy a massive amount of data into a small buffer.

The root cause is the lack of a proper bounds check on tf_payload_len after the subtraction. The fix for CVE-2025-29912 only addressed one specific underflow scenario but did not add a general validation that tf_payload_len must be within the actual buffer size.

Vulnerable vs. Patched Code

Vulnerable Code (CryptoLib <= 1.3.3):

int Crypto_TC_ApplySecurity(uint8_t *frame, uint32_t frame_len) {
    uint16_t fl = (frame[0] << 8) | frame[1];
    uint32_t header_size = 6; // example
    uint32_t security_overhead = 4; // example
    int32_t tf_payload_len = fl - header_size - security_overhead;

    // Incomplete check from CVE-2025-29912 fix
    if (fl < header_size) {
        return -1; // only checks fl, not tf_payload_len
    }

    // No check for negative tf_payload_len
    memcpy(output_buffer, frame + header_size, tf_payload_len); // overflow
}

Patched Code (Hypothetical Fix):

int Crypto_TC_ApplySecurity(uint8_t *frame, uint32_t frame_len) {
    uint16_t fl = (frame[0] << 8) | frame[1];
    uint32_t header_size = 6;
    uint32_t security_overhead = 4;
    int32_t tf_payload_len = fl - header_size - security_overhead;

    // Proper validation
    if (fl < header_size + security_overhead) {
        return -1; // reject frames with insufficient length
    }

    if (tf_payload_len <= 0) {
        return -1; // reject non-positive payload length
    }

    if ((uint32_t)tf_payload_len > output_buffer_size) {
        return -1; // ensure payload fits in buffer
    }

    memcpy(output_buffer, frame + header_size, (size_t)tf_payload_len);
}

Exploitation & Lab Setup

Red Team

Objective: Exploit the heap buffer overflow to achieve remote code execution or denial of service on a spacecraft's cFS.

Prerequisites:

  • Network access to the target spacecraft's telecommand link.
  • Knowledge of the CCSDS SDLS-EP frame format.
  • A target running CryptoLib <= 1.3.3.

Exploitation Steps:

  1. Craft a malicious TC frame with a carefully chosen fl field.
  2. Set fl to a value less than header_size + security_overhead (e.g., fl = 5 when header_size + security_overhead = 10).
  3. The calculation tf_payload_len = 5 - 10 = -5.
  4. The negative value is cast to size_t, becoming a huge number (e.g., 0xFFFFFFFFFFFFFFFB on 64-bit).
  5. The memcpy call will attempt to copy this huge amount of data from the frame into the heap buffer, causing an overflow.
  6. Carefully craft the frame data to overwrite heap metadata or function pointers to achieve code execution.

Example Malicious Frame (Hex):

00 05 [payload]  // fl = 5, header_size = 6, security_overhead = 4 => tf_payload_len = -5

The payload can be crafted to overwrite specific heap structures.

Lab Setup:

  • Use a virtual machine running a cFS environment with CryptoLib 1.3.3.
  • Use a network simulator (e.g., GNS3) to simulate the space link.
  • Use a Python script with Scapy to craft and send malicious frames.
from scapy.all import *
import struct

# Craft a malicious TC frame
frame = b'\x00\x05' + b'A' * 100  # fl = 5, payload of 100 bytes
# Send to target
send(IP(dst="192.168.1.100")/UDP(sport=1234, dport=5678)/Raw(load=frame))

Blue Team

Detection:

  • Monitor for anomalous TC frames with fl values that are too small relative to the expected header and security overhead.
  • Use network intrusion detection systems (NIDS) to flag frames where fl < header_size + security_overhead.
  • Monitor heap memory allocation and memcpy operations for unusually large copy sizes.

Mitigation:

  • Apply the hypothetical patch as soon as it becomes available.
  • Implement input validation at the network edge to reject malformed TC frames.
  • Use memory-safe languages or add bounds checking wrappers around memcpy.
  • Deploy runtime protection like AddressSanitizer (ASan) during testing.

Hunting:

  • Search logs for crashes or memory corruption errors in the CryptoLib module.
  • Look for network traffic with TC frames that have abnormally small fl fields.
  • Analyze heap dumps for signs of overflow (e.g., corrupted heap metadata).

Indicators of Compromise (IOCs)

  • Network IOCs:
    • TC frames where fl field value is less than the sum of header size and security overhead (typically < 10 bytes for standard configurations).
    • Repeated connection attempts from unusual IP addresses to the telecommand port.
  • Host IOCs:
    • Heap corruption errors in system logs.
    • Unexpected crashes of the CryptoLib process.
    • Memory regions containing large amounts of data from network frames.
  • File IOCs:
    • Modified CryptoLib binaries (if attacker replaces the library).
    • Unusual core dumps in the cFS data directory.

Detection Engineering

YARA Rule

rule CVE_2025_30356_CryptoLib_HeapOverflow {
    meta:
        description = "Detects malicious TC frames targeting CVE-2025-30356"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-30356"
    strings:
        $tc_header = { 00 ?? } // fl field in first two bytes
    condition:
        // Check if fl < 10 (typical header + security overhead)
        uint16(0) < 10 and
        // Ensure it's a TC frame (example: check for specific protocol byte)
        uint8(2) == 0x01
}

Sigma Rule

title: Detection of Malicious TC Frames for CVE-2025-30356
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects network traffic with TC frames having abnormally small fl field
author: Valters IT
date: 2025-04-10
logsource:
    category: network
    product: suricata
detection:
    selection:
        - frame_len: < 10
        - frame_type: "TC"
    condition: selection
falsepositives:
    - Legitimate short frames during testing
level: high

Suricata Rule

alert udp any any -> any any (msg:"CVE-2025-30356 CryptoLib Heap Buffer Overflow Attempt"; content:"|00 05|"; offset:0; depth:2; byte_test:2,<,10,0; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Isolate affected systems: If possible, disconnect spacecraft or ground stations using CryptoLib 1.3.3 from untrusted networks.
  2. Implement network-level filtering: Block TC frames where the fl field is less than the expected minimum (e.g., 10 bytes for standard configurations).
  3. Monitor for exploitation attempts: Use the provided detection rules to identify malicious traffic.

Long-term Fix:

  • Apply the official patch from the CryptoLib maintainers once released.
  • In the interim, apply the hypothetical patch shown in the "Vulnerable vs. Patched Code" section.
  • Conduct a thorough code review of all memcpy calls in CryptoLib to ensure proper bounds checking.

Compensating Controls:

  • Use a Web Application Firewall (WAF) or network gateway that can inspect and validate CCSDS frames.
  • Deploy runtime application self-protection (RASP) tools that can detect and block heap overflows.
  • Enable stack canaries and ASLR on the target system.

Valters IT Signature:

Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-30356/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.