☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
SOON CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H 🐛 CWE-476
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-54952

CVE-2024-54952 Null Pointer Dereference in Mikrotik
📅 PUBLISHED: 2025-05-29 00:00 UTC 🔄 UPDATED: 2026-08-12 09:04 UTC
⏳ SCORE PENDING — ANALYSIS IN PROGRESS [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.56%
👁️
0.56% probability
14.0× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1498
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: 6.40.5
CVSS VECTOR BREAKDOWN 0.0
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: N Confidentiality None
I: N Integrity None
A: H Availability High
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-54952 is a critical memory corruption vulnerability in MikroTik RouterOS version 6.40.5, specifically within the SMB service. The flaw allows a remote, unauthenticated attacker to trigger a null pointer dereference by sending specially crafted packets, leading to a Remote Denial of Service (DoS). This renders the SMB service unavailable, impacting file sharing and network management capabilities. The vulnerability has a CVSS score of 7.5 (High) due to its network attack vector, low complexity, and no required privileges or user interaction. No public exploit code or proof-of-concept is currently available, and no patch has been released by MikroTik.

⚡ 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

CVSS Breakdown & Threat Level

  • CVSS Score: 7.5 (High)
  • Attack Vector: Network (AV:N)
  • Attack Complexity: Low (AC:L)
  • Privileges Required: None (PR:N)
  • User Interaction: None (UI:N)
  • Scope: Unchanged (S:U)
  • Confidentiality Impact: None (C:N)
  • Integrity Impact: None (I:N)
  • Availability Impact: High (A:H)

The threat level is elevated due to the ease of exploitation and the potential for widespread disruption. An unauthenticated attacker can crash the SMB service, affecting all users relying on it for file sharing or network boot services. The lack of a patch increases the risk for unpatched systems.

Deep Dive & Mechanics

The vulnerability resides in the SMB service implementation within MikroTik RouterOS 6.40.5. The SMB protocol handles file sharing and printer sharing over a network. The flaw is a null pointer dereference (CWE-476), which occurs when the software attempts to use a memory pointer that has not been initialized or has been set to NULL.

When a specially crafted SMB packet is sent to the service, the parsing logic fails to validate a pointer before dereferencing it. This causes the service to access memory address 0x0, leading to an immediate crash. The crash is triggered without authentication, making it exploitable by any attacker who can reach the SMB port (typically TCP 445).

The root cause is likely improper input validation in the SMB packet handler. The code does not check for NULL pointers after memory allocation or during data structure traversal. This is a classic programming error that can be exploited to cause a denial of service.

Vulnerable vs. Patched Code

Since no patch is available, a direct code comparison is not possible. However, the vulnerable code likely resembles:

// Vulnerable pseudo-code
void handle_smb_packet(packet *p) {
    smb_header *hdr = parse_header(p);
    // Missing NULL check
    if (hdr->command == SMB_COM_NEGOTIATE) {
        // Dereference without validation
        process_negotiate(hdr->session);
    }
}

A patched version would include a NULL check:

// Patched pseudo-code
void handle_smb_packet(packet *p) {
    smb_header *hdr = parse_header(p);
    if (hdr == NULL) {
        return; // or log error
    }
    if (hdr->command == SMB_COM_NEGOTIATE) {
        if (hdr->session != NULL) {
            process_negotiate(hdr->session);
        } else {
            // Handle NULL session pointer
        }
    }
}

The fix involves adding proper validation before dereferencing pointers, ensuring that NULL pointers are handled gracefully without crashing.

Exploitation & Lab Setup

Red Team

To exploit this vulnerability, an attacker would craft a malicious SMB packet that triggers the null pointer dereference. Since no public exploit code is available, the following is a conceptual example using Python and the scapy library:

from scapy.all import *
import socket

# Craft a malformed SMB packet
# This is a simplified example; actual exploitation requires reverse engineering the SMB implementation
smb_packet = b'\x00\x00\x00\x00'  # Placeholder for malformed SMB header
smb_packet += b'\xff\x53\x4d\x42'  # SMB magic bytes
smb_packet += b'\x00' * 100  # Padding to trigger null pointer dereference

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('target_ip', 445))
sock.send(smb_packet)
sock.close()

Usage: Run the script against a vulnerable MikroTik RouterOS 6.40.5 device. The SMB service will crash, causing a denial of service.

Blue Team

To detect exploitation attempts, monitor for malformed SMB packets on port 445. Use network intrusion detection systems (NIDS) like Suricata or Snort with custom rules. Additionally, enable logging on the MikroTik device to capture SMB service crashes.

Detection Steps:

  1. Monitor SMB traffic for unusual packet sizes or malformed headers.
  2. Set up alerts for SMB service crashes in system logs.
  3. Use the Suricata rule provided in the Detection Engineering section.

Indicators of Compromise (IOCs)

  • Network IOCs:

    • Malformed SMB packets with unusual lengths or invalid headers.
    • Repeated connection attempts to port 445 from unknown IPs.
    • SMB service crashes logged in RouterOS system logs (e.g., "SMB service stopped unexpectedly").
  • System IOCs:

    • RouterOS logs showing SMB service failure.
    • Memory dumps or crash logs indicating null pointer dereference.
  • File IOCs:

    • No specific file IOCs as the vulnerability is memory-based.

Detection Engineering

YARA Rule

rule CVE_2024_54952_SMB_Null_Pointer {
    meta:
        description = "Detects malformed SMB packets targeting CVE-2024-54952"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-54952"
    strings:
        $smb_magic = { ff 53 4d 42 }  // SMB magic bytes
        $null_trigger = { 00 00 00 00 }  // Potential null pointer trigger
    condition:
        $smb_magic at 0 and #null_trigger > 5
}

Sigma Rule

title: Detection of Malformed SMB Packets for CVE-2024-54952
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects network traffic attempting to exploit CVE-2024-54952
author: Valters IT
date: 2025-04-10
logsource:
    category: network
    product: suricata
detection:
    selection:
        dest_port: 445
        payload|contains: 'ff534d42'  # SMB magic bytes in hex
        payload|length: > 100  # Unusually large payload
    condition: selection
falsepositives:
    - Legitimate SMB traffic with large packets
level: high

Suricata Rule

alert tcp any any -> any 445 (msg:"CVE-2024-54952 - Malformed SMB Packet"; flow:to_server; content:"|ff 53 4d 42|"; depth:4; pcre:"/^.{0,4}\x00{10,}/R"; classtype:attempted-dos; sid:1000001; rev:1;)

Remediation & Mitigation

Since no official patch is available, the following mitigations are recommended:

  1. Disable SMB Service: If SMB is not required, disable it on the MikroTik device via the web interface or CLI:

    /interface smb set enabled=no
    
  2. Network Segmentation: Restrict access to port 445 to trusted IPs only using firewall rules:

    /ip firewall filter add chain=input protocol=tcp dst-port=445 src-address-list=trusted action=accept
    /ip firewall filter add chain=input protocol=tcp dst-port=445 action=drop
    
  3. Upgrade RouterOS: Monitor MikroTik for a patched version and upgrade as soon as it becomes available.

  4. Intrusion Prevention: Deploy the Suricata rule to block malicious SMB packets.

  5. Monitoring: Enable logging and monitor for SMB service crashes.

Valters IT

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

port:445 MikroTik
MikroTik SMB

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-54952/ · 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.