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-2026-5245

CVE-2026-5245: Cesanta Mongoose Buffer Overflow Flaw

CVE-2026-5245 is a stack-based buffer overflow in Cesanta Mongoose up to 7.20 affecting the mDNS Record Handler. This vulnerability allows remote exploitation. This article covers technical details, affected versions, and patches.

Published: April 2, 2026

CVE-2026-5245 Overview

A stack-based buffer overflow vulnerability has been discovered in Cesanta Mongoose, an open-source embedded networking library, affecting versions up to 7.20. The vulnerability exists in the handle_mdns_record function within mongoose.c, specifically in the mDNS Record Handler component. An attacker can manipulate the buf argument to trigger a stack-based buffer overflow condition, potentially enabling remote code execution.

Critical Impact

Remote exploitation is possible through network-based attacks targeting the mDNS service. While the attack complexity is high, the exploit has been made publicly available, increasing the risk to unpatched systems.

Affected Products

  • Cesanta Mongoose versions up to 7.20
  • Applications and embedded devices using vulnerable Mongoose library versions
  • IoT devices and embedded systems utilizing Mongoose mDNS functionality

Discovery Timeline

  • 2026-04-02 - CVE-2026-5245 published to NVD
  • 2026-04-02 - Last updated in NVD database

Technical Details for CVE-2026-5245

Vulnerability Analysis

This vulnerability is classified under CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer). The flaw resides in the mDNS record handling code where insufficient bounds checking allows a maliciously crafted mDNS record to overflow stack-allocated buffers. The handle_mdns_record function processes incoming mDNS queries and responses, and when parsing the buf argument, fails to properly validate the data length against the destination buffer capacity.

The vulnerability can be exploited remotely over the network since mDNS operates on multicast UDP port 5353. However, successful exploitation requires a high degree of complexity due to the specific conditions needed to control the overflow and achieve code execution.

Root Cause

The root cause stems from improper boundary validation when handling mDNS record data in the handle_mdns_record function. The name building functionality constructs DNS names by copying label data without adequate length verification. As indicated in the patch comments, the response header length is 10 bytes, and the name length calculation follows the formula name->len + '.local' + 2 = name->len + 8. Insufficient validation of these lengths against buffer capacity creates the overflow condition.

Attack Vector

The attack can be conducted remotely over the network by sending specially crafted mDNS packets to a system running a vulnerable version of Mongoose. The attacker would need to:

  1. Identify a target system with Mongoose mDNS services exposed
  2. Craft a malicious mDNS record with an oversized or malformed buf argument
  3. Send the crafted packet to trigger the stack-based buffer overflow
  4. Potentially achieve code execution by controlling the overwritten stack data

The patch (commit 0d882f1b43ff2308b7486a56a9d60cd6dba8a3f1) addresses the vulnerability by implementing proper bounds checking and enhanced parameter validation in the affected functions.

c
// Response header length is 10 bytes
static const uint8_t mdns_answer[] = {
    0, 1,          // 2 bytes - record type, A
    0, 1,          // 2 bytes - address class, INET
    0, 0, 0, 120,  // 4 bytes - TTL
    0, 4           // 2 bytes - address length
};

// A name length is name->len + '.local' + 2 = name->len + 8
static uint8_t *build_name(struct mg_str *name, uint8_t *p) {
  *p++ = (uint8_t) name->len;  // label 1
  memcpy(p, name->buf, name->len), p += name->len;

Source: GitHub Commit Details

The patch adds explicit documentation of buffer size requirements and introduces additional validation parameters to encryption/decryption functions to prevent similar overflow conditions.

Detection Methods for CVE-2026-5245

Indicators of Compromise

  • Anomalous mDNS traffic patterns with unusually large record sizes on UDP port 5353
  • Unexpected crashes or memory corruption in applications using Mongoose library
  • System instability or abnormal behavior in IoT/embedded devices running Mongoose
  • Evidence of stack corruption in crash dumps or core files from affected processes

Detection Strategies

  • Monitor network traffic for malformed or oversized mDNS packets targeting port 5353
  • Implement intrusion detection rules to identify mDNS packets with abnormal record lengths
  • Deploy SentinelOne agents on systems running Mongoose to detect exploitation attempts through behavioral analysis
  • Review application logs for crash events or memory access violations in mDNS handling code

Monitoring Recommendations

  • Enable verbose logging for mDNS services to capture detailed packet information
  • Configure network monitoring tools to alert on mDNS traffic anomalies
  • Utilize SentinelOne's real-time threat detection to identify buffer overflow exploitation patterns
  • Establish baseline mDNS traffic patterns to identify deviations indicative of attack attempts

How to Mitigate CVE-2026-5245

Immediate Actions Required

  • Upgrade Cesanta Mongoose to version 7.21 or later immediately
  • Disable mDNS functionality if not required for operations
  • Implement network segmentation to limit exposure of mDNS services
  • Deploy network-level filtering to block malicious mDNS traffic from untrusted sources

Patch Information

The vulnerability is addressed in Mongoose version 7.21. The security patch is available in commit 0d882f1b43ff2308b7486a56a9d60cd6dba8a3f1. Organizations should upgrade to the fixed version as soon as possible. The vendor (Cesanta) responded professionally and released the patch promptly after disclosure.

Patch Resources:

  • GitHub Release 7.21
  • GitHub Commit Details

Workarounds

  • Disable mDNS service functionality in Mongoose configuration if not essential
  • Implement firewall rules to restrict mDNS traffic to trusted network segments only
  • Use network access control lists to limit which hosts can send mDNS queries to vulnerable systems
  • Consider deploying a reverse proxy or network appliance to filter mDNS traffic before it reaches vulnerable applications
bash
# Configuration example - Firewall rules to restrict mDNS access
# Block external mDNS traffic (UDP port 5353)
iptables -A INPUT -p udp --dport 5353 -s ! 192.168.1.0/24 -j DROP

# Allow mDNS only from trusted local network
iptables -A INPUT -p udp --dport 5353 -s 192.168.1.0/24 -j ACCEPT

# Log dropped mDNS packets for monitoring
iptables -A INPUT -p udp --dport 5353 -j LOG --log-prefix "mDNS-BLOCKED: "

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechMongoose

  • SeverityMEDIUM

  • CVSS Score6.3

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/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
  • AvailabilityLow
  • CWE References
  • CWE-119
  • Technical References
  • GitHub Mongoose Repository

  • GitHub Commit Details

  • GitHub Release 7.21

  • VulDB Submission #770103

  • VulDB #354826

  • VulDB #354826 CTI
  • Related CVEs
  • CVE-2026-24822: wxhelper Buffer Overflow Vulnerability

  • CVE-2026-5246: Cesanta Mongoose Auth Bypass 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