CVE-2025-66647

9.8 CRITICAL

📋 TL;DR

A buffer overflow vulnerability in RIOT OS's IPv6 fragmentation reassembly allows attackers to corrupt memory by sending specially crafted IPv6 packets. This affects IoT devices running RIOT OS with the gnrc_ipv6_ext_frag module enabled, potentially leading to remote code execution. The vulnerability requires network access to send IPv6 packets to vulnerable devices.

💻 Affected Systems

Products:
  • RIOT OS
Versions: Versions up to and including 2025.07
Operating Systems: RIOT OS
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when the gnrc_ipv6_ext_frag module is included in the build configuration. Many IoT devices using RIOT OS may have this module enabled for IPv6 functionality.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete device compromise, data exfiltration, or device becoming part of a botnet.

🟠

Likely Case

Device crash (denial of service) or memory corruption leading to unpredictable behavior.

🟢

If Mitigated

Limited impact if network segmentation prevents IPv6 packet injection or if the vulnerable module is disabled.

🌐 Internet-Facing: HIGH - IoT devices often have internet-facing interfaces and use IPv6, making them directly accessible to attackers.
🏢 Internal Only: MEDIUM - Requires network access but could be exploited internally if devices are on the same network segment.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires sending crafted IPv6 packets but no authentication. The attacker needs to understand the fragmentation buffer allocation mechanism.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2025.10

Vendor Advisory: https://github.com/RIOT-OS/RIOT/releases/tag/2025.10

Restart Required: Yes

Instructions:

1. Update RIOT OS to version 2025.10 or later. 2. Rebuild your application with the updated RIOT source. 3. Flash the updated firmware to affected devices. 4. Restart devices to apply the new firmware.

🔧 Temporary Workarounds

Disable IPv6 fragmentation module

all

Remove gnrc_ipv6_ext_frag from the build configuration to disable IPv6 fragmentation support.

Remove 'gnrc_ipv6_ext_frag' from USEMODULE in your Makefile or build configuration

Network segmentation

all

Isolate IoT devices on separate network segments to prevent unauthorized IPv6 packet injection.

🧯 If You Can't Patch

  • Implement strict network ACLs to block IPv6 fragmentation packets from untrusted sources
  • Monitor devices for crashes or abnormal behavior indicating potential exploitation attempts

🔍 How to Verify

Check if Vulnerable:

Check if RIOT OS version is 2025.07 or earlier AND gnrc_ipv6_ext_frag module is enabled in the build configuration.

Check Version:

Check the RIOT_VERSION macro in riotbuild.h or examine the firmware version string

Verify Fix Applied:

Verify RIOT OS version is 2025.10 or later and check that the buffer size validation is present in the gnrc_ipv6_ext_frag.c source file.

📡 Detection & Monitoring

Log Indicators:

  • Device crashes or reboots
  • Memory corruption errors in system logs
  • Unexpected packet buffer allocation failures

Network Indicators:

  • Unusual IPv6 fragmentation traffic to IoT devices
  • Multiple IPv6 fragments with offset=0
  • Small initial fragment followed by larger fragment

SIEM Query:

ipv6.fragment.offset == 0 AND (ipv6.fragment.length < expected OR multiple fragments with same offset)

🔗 References

📤 Share & Export