Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-2021-22945

CVE-2021-22945: Haxx Libcurl Use-After-Free Vulnerability

CVE-2021-22945 is a use-after-free vulnerability in Haxx Libcurl affecting MQTT data transmission. It causes memory corruption through improper pointer handling. This article covers technical details, affected versions, and mitigation.

Published: February 25, 2026

CVE-2021-22945 Overview

CVE-2021-22945 is a critical memory corruption vulnerability in libcurl affecting versions up to 7.73.0 and 7.78.0. When sending data to an MQTT server, libcurl could erroneously retain a pointer to already freed memory, subsequently using that pointer in later operations and potentially freeing it again. This double free and use-after-free condition can lead to memory corruption, information disclosure, and denial of service.

Critical Impact

This vulnerability enables attackers to exploit memory corruption via network-accessible MQTT communication, potentially leading to information disclosure and service crashes. The network attack vector with no authentication requirements makes this particularly dangerous for exposed systems.

Affected Products

  • Haxx libcurl (versions up to 7.73.0 and 7.78.0)
  • Fedora Project Fedora (versions 33 and 35)
  • NetApp Cloud Backup and Clustered Data ONTAP
  • Oracle MySQL Server
  • Apple macOS
  • Siemens SINEC INS
  • Debian Linux 11.0
  • Splunk Universal Forwarder
  • NetApp Hardware (H300S, H500S, H700S, H300E, H500E, H700E, H410S series)
  • NetApp SolidFire Baseboard Management Controller

Discovery Timeline

  • 2021-09-23 - CVE-2021-22945 published to NVD
  • 2025-06-09 - Last updated in NVD database

Technical Details for CVE-2021-22945

Vulnerability Analysis

This vulnerability represents a classic double free (CWE-415) condition occurring within libcurl's MQTT protocol implementation. The flaw manifests when libcurl processes data transmissions to MQTT servers, where memory management logic fails to properly track pointer state after initial deallocation.

The vulnerability occurs in a specific code path where libcurl sends data to an MQTT broker. Under certain circumstances, the library incorrectly retains a pointer reference to memory that has already been deallocated. This dangling pointer is then used in subsequent send operations, leading to a use-after-free condition. Additionally, the same memory region may be freed again, resulting in a double free vulnerability.

The impact of this vulnerability is significant because it can be triggered remotely through network communication with an MQTT server. An attacker who can influence the MQTT communication flow could potentially exploit this condition to cause memory corruption, crash the application, or potentially leak sensitive information from the process memory space.

Root Cause

The root cause is improper memory lifecycle management in libcurl's MQTT send functionality. When transmitting data to an MQTT server, the code fails to properly nullify or update pointer references after freeing memory, leaving dangling pointers that can be dereferenced or freed again in subsequent operations. This represents a failure in the memory ownership model within the MQTT protocol handler code.

Attack Vector

The attack vector is network-based, requiring no authentication or user interaction. An attacker can exploit this vulnerability through:

  1. Malicious MQTT Broker: Operating a rogue MQTT server that triggers the vulnerable code path when libcurl-based clients connect
  2. Man-in-the-Middle: Intercepting MQTT communications and manipulating responses to trigger the memory corruption
  3. Controlled Network Environment: In scenarios where attackers control network infrastructure between a victim application and MQTT services

The vulnerability is particularly concerning for applications that connect to untrusted or external MQTT servers, as the attack requires no special privileges and can be triggered entirely over the network.

Detection Methods for CVE-2021-22945

Indicators of Compromise

  • Unexpected application crashes or segmentation faults in processes using libcurl for MQTT communication
  • Memory corruption errors or heap-related warnings in system logs from curl-dependent applications
  • Abnormal MQTT traffic patterns or connections to unusual MQTT broker endpoints
  • Core dumps indicating double-free or use-after-free conditions in curl library functions

Detection Strategies

  • Monitor for crash reports and core dumps from applications utilizing libcurl, particularly those implementing MQTT functionality
  • Implement runtime memory sanitizers (AddressSanitizer, Valgrind) in development and testing environments to detect memory corruption issues
  • Deploy network monitoring to identify anomalous MQTT connection patterns or connections to unexpected broker addresses
  • Use SentinelOne's behavioral analysis capabilities to detect exploitation attempts targeting memory corruption vulnerabilities

Monitoring Recommendations

  • Enable detailed logging for MQTT-enabled applications to capture connection and data transfer events
  • Monitor system memory utilization and process health for applications using vulnerable libcurl versions
  • Implement network intrusion detection rules to identify potential exploitation attempts targeting MQTT protocol handlers
  • Regularly scan software inventory to identify systems running vulnerable libcurl versions

How to Mitigate CVE-2021-22945

Immediate Actions Required

  • Update libcurl to version 7.79.0 or later which contains the fix for this vulnerability
  • For applications bundling libcurl, update to vendor-patched versions as soon as available
  • Review and restrict MQTT broker connections to trusted endpoints only
  • Implement network segmentation to isolate MQTT-enabled systems from untrusted networks
  • Apply vendor-specific patches from Oracle, Apple, NetApp, Siemens, Debian, and other affected vendors

Patch Information

Multiple vendors have released patches addressing this vulnerability. Key resources include:

  • HackerOne Report #1269242 - Original vulnerability report
  • Oracle CPU October 2021 - Oracle MySQL Server patches
  • Siemens Product Security Advisory - SINEC INS patches
  • Debian Security Advisory DSA-5197 - Debian Linux patches
  • Apple Support Document - macOS security updates
  • NetApp Security Advisory NTAP-20211029-0003 - NetApp product patches
  • Gentoo GLSA 202212-01 - Gentoo Linux patches

Workarounds

  • Disable MQTT functionality in libcurl if not required by compiling without MQTT support
  • Implement strict network access controls to prevent connections to untrusted MQTT brokers
  • Use application-level firewalls to filter and inspect MQTT traffic
  • Consider using alternative MQTT client libraries until patching is complete
bash
# Check installed libcurl version
curl --version

# On Debian/Ubuntu systems, update libcurl
sudo apt-get update && sudo apt-get upgrade libcurl4

# On RHEL/CentOS/Fedora systems
sudo dnf update curl libcurl

# Verify the updated version
curl --version | head -1

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/TechLibcurl

  • SeverityCRITICAL

  • CVSS Score9.1

  • EPSS Probability0.35%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-415
  • Technical References
  • Full Disclosure Mailing List

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Gentoo GLSA 202212-01

  • NetApp Security Advisory NTAP-20211029-0003

  • Apple Support Document

  • Debian Security Advisory DSA-5197
  • Vendor Resources
  • Siemens Product Security Advisory

  • HackerOne Report #1269242

  • Oracle CPU October 2021 Alerts
  • Related CVEs
  • CVE-2020-8231: Haxx Libcurl Use-After-Free Vulnerability

  • CVE-2026-22026: CryptoLib KMC Client DoS Vulnerability

  • CVE-2025-14017: libcurl Race Condition Vulnerability

  • CVE-2025-14819: libcurl TLS Information Disclosure 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