The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-66023

CVE-2025-66023: NanoMQ MQTT Broker UAF Vulnerability

CVE-2025-66023 is a heap use-after-free flaw in NanoMQ MQTT Broker's bridge client that allows malicious brokers to trigger crashes or memory corruption. This article covers technical details, affected versions, and patches.

Updated: January 22, 2026

CVE-2025-66023 Overview

CVE-2025-66023 is a Heap-Use-After-Free (UAF) vulnerability in NanoMQ MQTT Broker, an all-around Edge Messaging Platform. The vulnerability exists within the MQTT bridge client component, implemented via the underlying NanoNNG library. When NanoMQ acts as a bridge connecting to a remote MQTT broker, a malicious remote broker can trigger a crash resulting in Denial of Service (DoS) or potential memory corruption by accepting the connection and immediately sending a malformed packet sequence.

Critical Impact

A malicious remote MQTT broker can cause service crashes or memory corruption in NanoMQ bridge deployments by sending malformed packet sequences immediately after connection establishment.

Affected Products

  • NanoMQ MQTT Broker versions prior to 0.24.5
  • NanoNNG library (underlying implementation)
  • Systems using NanoMQ as an MQTT bridge to remote brokers

Discovery Timeline

  • 2026-01-01 - CVE CVE-2025-66023 published to NVD
  • 2026-01-02 - Last updated in NVD database

Technical Details for CVE-2025-66023

Vulnerability Analysis

This Use After Free vulnerability (CWE-416) occurs in the MQTT bridge client component of NanoMQ when it connects to a remote MQTT broker. The flaw stems from improper state management during the MQTT connection handshake process. According to the MQTT protocol specification, the CONNACK packet must always be the first packet received from the broker after a connection is established. However, NanoMQ versions prior to 0.24.5 did not enforce this protocol requirement strictly.

When a malicious broker accepts a connection and immediately sends a malformed or out-of-sequence packet instead of the expected CONNACK, the NanoMQ client enters an inconsistent state. This state confusion leads to memory being freed prematurely while still being referenced elsewhere in the code, creating the classic Use After Free condition.

Root Cause

The root cause is insufficient protocol adherence validation in the MQTT client SDK embedded in NanoMQ. The client implementation failed to verify that CONNACK is always the first packet processed after connection establishment. This oversight allowed a malicious server to exploit the state machine by sending unexpected packets, causing the client to access memory that had already been deallocated.

Attack Vector

The attack requires network access and involves a malicious MQTT broker that NanoMQ is configured to bridge with. The attack sequence proceeds as follows:

  1. NanoMQ initiates a bridge connection to the malicious broker
  2. The malicious broker accepts the TCP connection
  3. Instead of sending the expected CONNACK packet, the broker immediately sends a malformed packet sequence
  4. NanoMQ's state machine becomes confused, leading to premature memory deallocation
  5. Subsequent operations attempt to access the freed memory, causing a crash or potential memory corruption

The vulnerability can be exploited to achieve Denial of Service through application crashes. While the primary impact is availability-related, the memory corruption aspect could potentially lead to more severe consequences in certain scenarios.

Detection Methods for CVE-2025-66023

Indicators of Compromise

  • Unexpected NanoMQ process crashes or restarts when bridge connections are active
  • Core dumps showing heap corruption or UAF-related errors in NanoNNG library functions
  • Abnormal connection patterns from remote MQTT brokers with immediate disconnections
  • Log entries indicating malformed packet processing errors during bridge handshake

Detection Strategies

  • Monitor NanoMQ service stability and correlate crashes with bridge connection events
  • Implement network traffic analysis to detect unusual MQTT packet sequences during connection establishment
  • Deploy application-level monitoring to detect memory corruption signatures
  • Review NanoMQ logs for protocol violation warnings related to packet ordering

Monitoring Recommendations

  • Set up alerts for NanoMQ process crashes with automatic restart monitoring
  • Enable verbose logging for MQTT bridge connections to capture packet sequence anomalies
  • Monitor memory usage patterns in NanoMQ processes for signs of heap corruption
  • Track connection establishment success/failure rates with remote brokers

How to Mitigate CVE-2025-66023

Immediate Actions Required

  • Upgrade NanoMQ to version 0.24.5 or later immediately
  • Audit all configured MQTT bridge connections to ensure they connect only to trusted brokers
  • Implement network segmentation to restrict which brokers can be bridged
  • Consider temporarily disabling non-essential bridge connections until patching is complete

Patch Information

The fix is available in NanoMQ version 0.24.5. The patch enforces stricter protocol adherence in the MQTT client SDK embedded in NanoMQ. Specifically, it ensures that CONNACK is always the first packet processed in the line, preventing the state confusion that led to the Heap-Use-After-Free when a malicious server sent a malformed packet sequence immediately after connection establishment.

For detailed patch information, refer to the GitHub Pull Request and the GitHub Security Advisory.

Workarounds

  • Validate the remote broker before establishing bridge connections to ensure it is trusted and legitimate
  • Implement allow-listing for broker endpoints that NanoMQ is permitted to bridge with
  • Deploy network-level controls to prevent connections to untrusted MQTT brokers
  • Consider using a reverse proxy or gateway to validate MQTT traffic before it reaches NanoMQ

If immediate patching is not possible, organizations should carefully review their bridge configurations and ensure that all connected remote brokers are trusted entities. Network-level filtering can provide an additional layer of protection by restricting which external endpoints NanoMQ can communicate with.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeUse After Free

  • Vendor/TechNanomq

  • SeverityMEDIUM

  • CVSS Score6.9

  • EPSS Probability0.05%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-416
  • Technical References
  • GitHub Pull Request

  • GitHub Issue Discussion

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-22040: NanoMQ MQTT Broker Use-After-Free Flaw

  • CVE-2026-34608: NanoMQ MQTT Broker Buffer Overflow Flaw

  • CVE-2026-32696: NanoMQ MQTT Broker DoS Vulnerability

  • CVE-2026-21888: NanoMQ MQTT Broker Buffer Overflow Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English