A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2024-10525

CVE-2024-10525: Eclipse Mosquitto Buffer Overflow Flaw

CVE-2024-10525 is a buffer overflow vulnerability in Eclipse Mosquitto that allows malicious brokers to trigger out-of-bounds memory access in clients. This article covers the technical details, affected versions, and mitigations.

Published: May 26, 2026

CVE-2024-10525 Overview

CVE-2024-10525 affects Eclipse Mosquitto, a widely deployed open-source MQTT broker and client library used in Internet of Things (IoT) and messaging architectures. The flaw resides in libmosquitto versions 1.3.2 through 2.0.18. A malicious broker can send a crafted SUBACK packet containing no reason codes, causing a connected client to perform an out-of-bounds memory access inside its on_subscribe callback. The mosquitto_sub and mosquitto_rr command-line clients are both impacted because they link against libmosquitto.

Critical Impact

A malicious or compromised MQTT broker can corrupt memory in any connected Mosquitto client, potentially crashing the client or enabling further exploitation of subscribers in IoT and telemetry pipelines.

Affected Products

  • Eclipse Mosquitto libmosquitto versions 1.3.2 through 2.0.18
  • mosquitto_sub client (bundled with affected versions)
  • mosquitto_rr client (bundled with affected versions)

Discovery Timeline

  • 2024-10-30 - CVE-2024-10525 published to the National Vulnerability Database (NVD)
  • 2024-10 - Eclipse Foundation releases Mosquitto 2.0.19 with the fix
  • 2025-02 - Debian LTS publishes a backported security update
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2024-10525

Vulnerability Analysis

The defect is an out-of-bounds memory access in the client-side handler for MQTT SUBACK packets. When a client subscribes to one or more topics, the broker is expected to reply with a SUBACK containing a reason code for each subscription. The vulnerable code in lib/handle_suback.c computes the number of granted QoS entries from the packet's remaining length without validating that at least one entry is present. When a broker sends a SUBACK with zero reason codes, the code proceeds to allocate a zero-length buffer and then dereferences or processes entries that do not exist, triggering out-of-bounds reads or writes during invocation of the client's on_subscribe callback.

The weakness is classified under CWE-122 (Heap-based Buffer Overflow) and CWE-787 (Out-of-bounds Write). Exploitation requires the client to connect to an attacker-controlled or compromised broker, which is realistic in federated IoT deployments and bridged broker topologies.

Root Cause

The handler in lib/handle_suback.c derives qos_count from remaining_length - pos and immediately uses it for memory allocation and iteration. No check enforced the MQTT protocol requirement that a SUBACK carry at least one reason code, allowing a malformed packet to drive subsequent buffer logic into undefined territory.

Attack Vector

The attacker operates an MQTT broker or intercepts broker traffic. When a vulnerable client subscribes to a topic, the broker responds with a crafted SUBACK whose payload terminates immediately after the variable header. The vulnerable client computes qos_count == 0, allocates a zero-byte granted_qos buffer, and then triggers the on_subscribe callback with invalid memory references.

c
	qos_count = (int)(mosq->in_packet.remaining_length - mosq->in_packet.pos);
+	if(qos_count == 0) return MOSQ_ERR_PROTOCOL;
	granted_qos = mosquitto__malloc((size_t)qos_count*sizeof(int));
	if(!granted_qos){
#ifdef WITH_BROKER

Source: eclipse-mosquitto/mosquitto commit 8ab20b4 — the added guard rejects SUBACK packets with missing reason codes by returning MOSQ_ERR_PROTOCOL before any allocation occurs.

Detection Methods for CVE-2024-10525

Indicators of Compromise

  • Unexpected crashes or segmentation faults in mosquitto_sub, mosquitto_rr, or custom applications linked against libmosquitto
  • MQTT SUBACK packets with a remaining length that leaves no room for reason codes after the variable header
  • Connections from Mosquitto clients to untrusted, public, or unverified broker endpoints

Detection Strategies

  • Inventory all hosts running libmosquitto between versions 1.3.2 and 2.0.18 using software bill of materials (SBOM) tooling or package managers (dpkg -l mosquitto, rpm -q mosquitto).
  • Inspect MQTT traffic at the network boundary for malformed SUBACK packets where the payload length is shorter than expected for the requested subscription count.
  • Correlate client process crashes with preceding outbound MQTT sessions to identify potential exploitation attempts.

Monitoring Recommendations

  • Log all outbound MQTT broker destinations from IoT gateways and edge devices to detect connections to unauthorized brokers.
  • Enable core dump collection on devices running Mosquitto clients to support post-incident analysis.
  • Track the Eclipse vulnerability report and Debian LTS announcements for downstream patch availability.

How to Mitigate CVE-2024-10525

Immediate Actions Required

  • Upgrade libmosquitto and the Mosquitto client utilities to version 2.0.19 or later on all affected systems.
  • For Debian-based distributions on long-term support, apply the security update referenced in the Debian LTS announcement.
  • Restrict outbound MQTT connections so that clients only reach trusted, authenticated brokers.

Patch Information

The fix is upstream in Mosquitto 2.0.19, announced in the Mosquitto 2.0.19 release blog. The corrective change is captured in commit 8ab20b4 and adds a protocol validation check that rejects SUBACK packets with missing reason codes:

text
Client library:
- Don't allow SUBACK with missing reason codes.

Source: Mosquitto ChangeLog

Workarounds

  • Configure clients to connect only to brokers under organizational control and enforce mutual TLS authentication to prevent rogue brokers from impersonating trusted endpoints.
  • Use MQTT bridges or proxies that validate SUBACK packet structure before forwarding traffic to downstream clients.
  • Where patching is not yet feasible, avoid using mosquitto_sub and mosquitto_rr against untrusted brokers and isolate IoT clients on segmented networks.
bash
# Verify the installed Mosquitto client library version
mosquitto_sub --help | head -1
dpkg -l | grep -E 'mosquitto|libmosquitto'

# Upgrade on Debian/Ubuntu after the security update is available
sudo apt-get update && sudo apt-get install --only-upgrade mosquitto mosquitto-clients libmosquitto1

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechEclipse Mosquitto

  • SeverityHIGH

  • CVSS Score7.2

  • EPSS Probability17.89%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N/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
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-122

  • CWE-787
  • Technical References
  • Mosquitto Version Release Blog

  • Debian LTS Announcement
  • Vendor Resources
  • GitHub Commit Update

  • GitLab Vulnerability Report
  • Related CVEs
  • CVE-2023-0809: Eclipse Mosquitto DOS Vulnerability

  • CVE-2024-8376: Eclipse Mosquitto Use-After-Free Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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