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
    • 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-8376

CVE-2024-8376: Eclipse Mosquitto Use-After-Free Flaw

CVE-2024-8376 is a use-after-free vulnerability in Eclipse Mosquitto that allows attackers to trigger memory leaks, segmentation faults, or heap corruption. This article covers technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2024-8376 Overview

CVE-2024-8376 is a critical memory corruption vulnerability affecting Eclipse Mosquitto, the popular open-source MQTT message broker widely used in IoT deployments. The vulnerability allows an attacker to trigger memory leaks, segmentation faults, or heap-use-after-free conditions by sending specially crafted sequences of MQTT control packets including CONNECT, DISCONNECT, SUBSCRIBE, UNSUBSCRIBE, and PUBLISH commands.

Critical Impact

Remote attackers can exploit this vulnerability to cause denial of service conditions or potentially achieve further system compromise through heap-use-after-free exploitation in Eclipse Mosquitto deployments up to version 2.0.18a.

Affected Products

  • Eclipse Mosquitto versions up to and including 2.0.18a
  • IoT systems and deployments using vulnerable Mosquitto broker instances
  • MQTT-based infrastructure relying on affected Mosquitto versions

Discovery Timeline

  • 2024-10-11 - CVE-2024-8376 published to NVD
  • 2024-11-15 - Last updated in NVD database

Technical Details for CVE-2024-8376

Vulnerability Analysis

This vulnerability encompasses multiple memory corruption issues within Eclipse Mosquitto's handling of MQTT protocol messages. The root weakness is classified under CWE-401 (Missing Release of Memory after Effective Lifetime), indicating improper memory management during packet processing. An attacker with network access can exploit these flaws by sending specific sequences of MQTT control packets to a vulnerable Mosquitto broker.

The vulnerability manifests in three distinct failure modes: memory leaking where allocated memory is not properly freed, segmentation faults causing broker crashes, and heap-use-after-free conditions where memory is accessed after being deallocated. The heap-use-after-free variant is particularly concerning as it may allow for more sophisticated exploitation beyond denial of service.

Root Cause

The vulnerability stems from improper memory lifecycle management (CWE-401) within Mosquitto's packet processing logic. When handling rapid sequences of CONNECT, DISCONNECT, SUBSCRIBE, UNSUBSCRIBE, and PUBLISH packets, the broker fails to properly track and release memory allocations. This results in memory resources not being freed after their effective lifetime, leading to memory exhaustion or use-after-free conditions when deallocated memory regions are subsequently accessed.

Attack Vector

The attack vector is network-based and requires low privileges to execute. An attacker must be able to establish MQTT connections to the target Mosquitto broker, after which they can send malicious sequences of protocol packets. The attack does not require user interaction and can be executed remotely against any exposed Mosquitto instance running a vulnerable version.

The exploitation involves sending specific orderings of MQTT control packets that trigger the memory management flaws. For example, rapidly alternating between connection establishment and teardown combined with subscription operations can trigger the heap-use-after-free condition.

For technical details regarding the specific packet sequences and memory handling issues, refer to the GitLab Vulnerability Reports and the official security commit.

Detection Methods for CVE-2024-8376

Indicators of Compromise

  • Unexpected Mosquitto broker crashes or restarts, particularly with segmentation fault errors
  • Gradual memory consumption increase on systems running Mosquitto, indicating potential memory leak exploitation
  • Unusual patterns of MQTT connection and disconnection events from single sources
  • Core dumps showing heap corruption or use-after-free memory access violations

Detection Strategies

  • Monitor Mosquitto broker logs for abnormal connection/disconnection patterns and unexpected terminations
  • Implement network monitoring to detect rapid sequences of MQTT control packets from individual clients
  • Deploy memory monitoring tools to detect gradual memory consumption increases in Mosquitto processes
  • Configure alerting on broker restarts or crashes to identify potential exploitation attempts

Monitoring Recommendations

  • Enable verbose logging in Mosquitto to capture detailed connection lifecycle events
  • Implement process monitoring with automatic restart capabilities while investigating root cause
  • Monitor system memory utilization and set thresholds for Mosquitto process memory consumption
  • Review connection logs for clients exhibiting suspicious rapid connect/disconnect behavior

How to Mitigate CVE-2024-8376

Immediate Actions Required

  • Upgrade Eclipse Mosquitto to version 2.0.19 or later immediately
  • Review network access controls to limit which clients can connect to MQTT brokers
  • Implement rate limiting on MQTT connections to slow potential exploitation attempts
  • Monitor broker stability and memory usage for signs of active exploitation

Patch Information

Eclipse Foundation has released version 2.0.19 which addresses this vulnerability. The fix is available in the GitHub Release v2.0.19. The specific commit addressing this vulnerability can be reviewed at the GitHub Commit.

Workarounds

  • Restrict network access to Mosquitto brokers using firewall rules to trusted clients only
  • Implement connection rate limiting at the network level to prevent rapid packet sequences
  • Deploy Mosquitto behind a reverse proxy or load balancer with connection throttling capabilities
  • Consider implementing client authentication requirements to limit anonymous access
bash
# Configuration example - Restrict listener to specific interface and require authentication
# Add to mosquitto.conf

# Bind to specific interface instead of all interfaces
listener 1883 127.0.0.1

# Require authentication for all connections
allow_anonymous false
password_file /etc/mosquitto/passwd

# Connection rate limiting (if supported by your deployment)
max_connections 100

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/TechEclipse Mosquitto

  • SeverityHIGH

  • CVSS Score7.2

  • EPSS Probability0.29%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/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-401
  • Technical References
  • GitLab CVE Assignment Issue

  • GitLab Vulnerability Report #216

  • GitLab Vulnerability Report #217

  • GitLab Vulnerability Report #218

  • GitLab Vulnerability Report #227

  • Mosquitto Official Website
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Release v2.0.19
  • Related CVEs
  • CVE-2023-0809: Eclipse Mosquitto DOS Vulnerability
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