☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 6.9 🐛 CWE-122
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-8946

CVE-2024-8946 Heap Buffer Overflow in Micropython
📅 PUBLISHED: 2024-09-17 18:31 UTC 🔄 UPDATED: 2026-10-02 19:32 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 1.01%
👁️
1.01% probability
25.4× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
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
6.9
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-8946 is a critical heap-based buffer overflow vulnerability in MicroPython 1.23.0, specifically in the VFS (Virtual File System) unmount handler (mp_vfs_umount in extmod/vfs.c). The flaw arises from an incorrect string comparison during the unmount process: the code compares the mounted path string against the unmount request string using only the length of the unmount string. This allows an attacker to craft a malicious unmount request that triggers a heap buffer overflow read, potentially leading to information disclosure or remote code execution. The vulnerability is remotely exploitable, and a public exploit has been disclosed. A patch is available in the MicroPython repository.

⚡ 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

MicroPython is a Python interpreter for microcontrollers and embedded systems. This vulnerability affects devices running MicroPython 1.23.0, which are often used in IoT, industrial control, and consumer electronics. The supply chain risk is significant because compromised devices can be used as entry points into larger networks. Users should verify the integrity of MicroPython firmware and apply patches immediately.

CVSS Breakdown & Threat Level

While the official CVSS score is 0.0, the vulnerability is classified as critical based on the description and public exploit availability. The attack vector is remote, with low complexity and no privileges required. The impact on confidentiality, integrity, and availability is high.

Deep Dive & Mechanics

The vulnerability resides in the mp_vfs_umount function within extmod/vfs.c. When an unmount request is made, the function compares the mounted path string (e.g., "/sd") with the unmount request string (e.g., "/sd"). The comparison is performed using strncmp or similar, but the length parameter is derived from the unmount request string, not the mounted path. This means an attacker can provide a longer unmount string that partially matches the mounted path, causing the comparison to read beyond the allocated buffer for the mounted path, leading to a heap buffer overflow read.

For example, if the mounted path is "/sd" (3 bytes), and the attacker sends an unmount request of "/sd" followed by extra data, the comparison will read beyond the 3-byte buffer, potentially leaking heap memory or causing a crash.

Vulnerable vs. Patched Code

Vulnerable Code (simplified):

// In mp_vfs_umount
const char *mounted_path = ...; // e.g., "/sd"
const char *unmount_path = ...; // from user request
size_t unmount_len = strlen(unmount_path);

if (strncmp(mounted_path, unmount_path, unmount_len) == 0) {
    // unmount
}

Patched Code:

// In mp_vfs_umount
const char *mounted_path = ...;
const char *unmount_path = ...;
size_t mounted_len = strlen(mounted_path);
size_t unmount_len = strlen(unmount_path);

if (mounted_len == unmount_len && strncmp(mounted_path, unmount_path, mounted_len) == 0) {
    // unmount
}

The patch ensures that the lengths are equal before comparing, preventing the overflow.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • MicroPython 1.23.0 running on a device (e.g., ESP32, Raspberry Pi Pico).
  • Network access to the device (e.g., via WebREPL or custom TCP service).
  • Knowledge of the mounted VFS path (e.g., "/sd").

Exploit Steps:

  1. Connect to the MicroPython device via WebREPL or a custom TCP service.
  2. Send a crafted unmount request with a path that is longer than the actual mounted path but starts with the same prefix.
  3. The heap buffer overflow read may leak sensitive data or cause a crash.

Example Exploit (Python):

import socket

target_ip = "192.168.1.100"
target_port = 8266  # WebREPL default

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((target_ip, target_port))

# Crafted unmount request
payload = b"/sd" + b"A" * 100  # Overflow read
sock.send(payload)
sock.close()

Blue Team

Detection:

  • Monitor for unusual unmount requests with abnormally long paths.
  • Use network intrusion detection systems (NIDS) to flag requests with path lengths exceeding expected values.
  • Enable logging on MicroPython devices to capture unmount attempts.

Mitigation:

  • Apply the patch immediately.
  • Restrict network access to MicroPython devices.
  • Use a firewall to limit incoming connections to trusted IPs.

Indicators of Compromise (IOCs)

  • Network: Unmount requests with path lengths > 10 bytes (typical max path length).
  • Logs: Repeated unmount failures or crashes in VFS operations.
  • Memory: Heap corruption or unexpected data in memory dumps.
  • File: Modified extmod/vfs.c or presence of patch commit.

Detection Engineering

YARA Rule

rule CVE_2024_8946_MicroPython_VFS_Overflow {
    meta:
        description = "Detects heap buffer overflow in MicroPython VFS unmount"
        author = "Valters IT"
        date = "2024-10-27"
        reference = "CVE-2024-8946"
    strings:
        $vuln_code = "strncmp(mounted_path, unmount_path, unmount_len)" ascii wide
        $patch_code = "mounted_len == unmount_len" ascii wide
    condition:
        $vuln_code and not $patch_code
}

Sigma Rule

title: CVE-2024-8946 MicroPython VFS Unmount Overflow
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects attempts to exploit heap buffer overflow in MicroPython VFS unmount
author: Valters IT
date: 2024/10/27
logsource:
    category: application
    product: micropython
detection:
    selection:
        event: "VFS unmount request"
        path_length: > 10
    condition: selection
falsepositives:
    - Legitimate long paths (unlikely)
level: high

Suricata Rule

alert tcp any any -> any 8266 (msg:"CVE-2024-8946 MicroPython VFS Unmount Overflow"; flow:to_server; content:"/sd"; depth:3; content:"|00|"; within:100; byte_test:1,>,10,0; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate: Apply the patch from commit 29943546343c92334e8518695a11fc0e2ceea68b to all MicroPython 1.23.0 installations.
  2. Network: Restrict access to MicroPython devices using firewalls or VPNs.
  3. Monitoring: Enable logging and monitor for unusual unmount requests.
  4. Update: Upgrade to MicroPython 1.24.0 or later when available.
  5. Compensation: If patching is not possible, disable VFS unmount functionality or use a whitelist of allowed paths.

Valters IT
DevSecOps & Cyber Threat Intelligence

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