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

CVE-2024-25394

CVE-2024-25394 Buffer Overflow in Rt-thread
📅 PUBLISHED: 2024-03-27 00:00 UTC 🔄 UPDATED: 2026-09-23 20:38 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.64%
👁️
0.64% probability
15.9× 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
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-25394 identifies a buffer overflow vulnerability in the RT-Thread real-time operating system, specifically within the YMODEM file transfer protocol implementation in utilities/ymodem/ry_sy.c. The flaw arises from an incorrect sprintf call or a missing null-terminator (/0 character), which can lead to memory corruption. This vulnerability affects RT-Thread through version 5.0.2 and currently has no known patch or public exploit. The CVSS score is 0.0, indicating insufficient data for scoring, but the underlying issue is a classic buffer overflow (CWE-120) that could be exploited for denial of service or potential code execution in embedded systems.

⚡ 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

RT-Thread is an open-source embedded RTOS widely used in IoT devices, industrial controllers, and consumer electronics. The vulnerability resides in the YMODEM utility, which is often included in firmware update mechanisms. If exploited, an attacker could compromise device integrity during over-the-air (OTA) updates, leading to supply chain risks for manufacturers and end-users.

CVSS Breakdown & Threat Level

  • CVSS Score: 0.0 (Insufficient Information)
  • Attack Vector: Network (likely, as YMODEM is used over serial or network connections)
  • Attack Complexity: Low
  • Privileges Required: None
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: High (potential memory leak)
  • Integrity Impact: High (potential code injection)
  • Availability Impact: High (potential crash)
  • Threat Level: High (due to lack of patch and potential for remote exploitation in embedded systems)

Deep Dive & Mechanics

The vulnerability is located in utilities/ymodem/ry_sy.c within the RT-Thread source tree. The YMODEM protocol is used for file transfers, often in bootloaders or firmware update routines. The issue stems from an incorrect use of sprintf or a missing null terminator, leading to a buffer overflow when processing crafted YMODEM packets.

Root Cause Analysis:

  • The sprintf function is used to format data into a fixed-size buffer without proper bounds checking.
  • Alternatively, a missing null terminator (/0) causes the buffer to be read or written beyond its allocated size.
  • This can corrupt adjacent memory, potentially overwriting function pointers or return addresses.

Attack Vector:

  • An attacker sends a specially crafted YMODEM packet (e.g., with an overly long filename or data block) to a device running RT-Thread.
  • The vulnerable code processes the packet, triggering the overflow.
  • Successful exploitation could lead to denial of service or arbitrary code execution.

Vulnerable vs. Patched Code

Vulnerable Code (ry_sy.c, <= 5.0.2):

// Example vulnerable snippet (hypothetical based on description)
char buffer[64];
sprintf(buffer, "%s", user_input); // No bounds checking

Patched Code (if available):

// Hypothetical fix using snprintf
char buffer[64];
snprintf(buffer, sizeof(buffer), "%s", user_input);

Note: No official patch has been released as of this report. The fix should involve replacing sprintf with snprintf or adding explicit null termination.

Exploitation & Lab Setup

Red Team (Offensive)

  1. Environment Setup:

    • Download RT-Thread source (version 5.0.2) from GitHub.
    • Build the YMODEM utility for a target platform (e.g., QEMU or STM32).
    • Set up a serial connection to the device.
  2. Exploitation Steps:

    • Craft a YMODEM packet with an oversized filename field (e.g., 256 bytes).
    • Send the packet using a tool like ymodem or custom Python script.
    • Observe crash or memory corruption.
  3. Proof-of-Concept (Python):

import serial
import time

# Craft oversized YMODEM packet
payload = b'\x01' + b'A' * 255 + b'\x00'  # SOH + filename + null
ser = serial.Serial('/dev/ttyUSB0', 115200)
ser.write(payload)
time.sleep(1)
print(ser.read(100))

Blue Team (Defensive)

  1. Detection:

    • Monitor for anomalous YMODEM packets with excessive length.
    • Use network intrusion detection systems (NIDS) to flag oversized payloads.
  2. Mitigation:

    • Disable YMODEM service if not required.
    • Apply input validation and bounds checking in custom firmware.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • YMODEM packets with filename fields exceeding 128 bytes.
    • Repeated connection attempts to port 21 (FTP) or serial ports with YMODEM data.
  • Host IOCs:
    • Unexpected crashes or reboots of RT-Thread devices.
    • Memory corruption logs in system debug output.
  • File IOCs:
    • Modified ry_sy.c or related binaries with patched code.

Detection Engineering

YARA Rule

rule CVE_2024_25394_RTThread_YMODEM_Overflow {
    meta:
        description = "Detects buffer overflow in RT-Thread YMODEM implementation"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-25394"
    strings:
        $s1 = "sprintf" ascii wide nocase
        $s2 = "ry_sy.c" ascii wide nocase
        $s3 = "ymodem" ascii wide nocase
    condition:
        all of them
}

Sigma Rule

title: CVE-2024-25394 RT-Thread YMODEM Buffer Overflow
id: 8a9b3c2d-1e5f-4a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects oversized YMODEM packets targeting RT-Thread devices
author: Valters IT
logsource:
    category: network
    product: suricata
detection:
    selection:
        app_protocol: ymodem
        length: > 128
    condition: selection
falsepositives:
    - Legitimate large file transfers (rare)
level: high

Suricata Rule

alert tcp any any -> any 21 (msg:"CVE-2024-25394 RT-Thread YMODEM Buffer Overflow"; flow:to_server; content:"|01|"; offset:0; depth:1; content:"|00|"; within:256; byte_test:1,>,128,1; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Actions:

    • Disable YMODEM service on exposed devices.
    • Apply network segmentation to limit access to RT-Thread devices.
  2. Long-term Fix:

    • Patch the vulnerable code by replacing sprintf with snprintf and ensuring null termination.
    • Monitor RT-Thread repository for official patch release.
  3. Workarounds:

    • Use alternative file transfer protocols (e.g., XMODEM, TFTP) with proper bounds checking.
    • Implement input validation in custom firmware update routines.
  4. Detection:

    • Deploy YARA and Sigma rules to identify vulnerable binaries and network traffic.
    • Enable logging and alerting for YMODEM activity.

Valters IT
DevSecOps & Cyber Threat Intelligence
Report generated for CVE-2024-25394

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-25394/ · 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.