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

CVE-2026-29013: libcoap Buffer Overflow Vulnerability

CVE-2026-29013 is a buffer overflow flaw in libcoap's OSCORE CBOR handling that enables out-of-bounds reads and potential heap corruption. This article covers the technical details, affected versions, impact, and mitigation strategies.

Published: April 23, 2026

CVE-2026-29013 Overview

libcoap contains out-of-bounds read vulnerabilities in OSCORE Appendix B.2 CBOR unwrap handling where get_byte_inc() in src/oscore/oscore_cbor.c relies solely on assert() for bounds checking, which is removed in release builds compiled with NDEBUG. Attackers can send crafted CoAP requests with malformed OSCORE options or responses during OSCORE negotiation to trigger out-of-bounds reads during CBOR parsing and potentially cause heap buffer overflow writes through integer wraparound in allocation size computation.

Critical Impact

This vulnerability enables remote attackers to exploit out-of-bounds read conditions and potentially trigger heap buffer overflow writes through network-accessible CoAP endpoints, potentially leading to information disclosure, denial of service, or memory corruption in IoT and constrained network environments.

Affected Products

  • libcoap (versions with vulnerable OSCORE CBOR handling)

Discovery Timeline

  • 2026-04-17 - CVE CVE-2026-29013 published to NVD
  • 2026-04-20 - Last updated in NVD database

Technical Details for CVE-2026-29013

Vulnerability Analysis

This vulnerability is classified as an Out-of-Bounds Read (CWE-125) affecting the libcoap library's OSCORE implementation. The core issue lies in the get_byte_inc() function within src/oscore/oscore_cbor.c, which performs CBOR (Concise Binary Object Representation) parsing for OSCORE Appendix B.2 operations. The function relies exclusively on assert() statements for bounds validation—a practice that creates a significant security gap because these assertions are compiled out in production release builds when the NDEBUG preprocessor flag is defined.

The vulnerability manifests during the processing of OSCORE options in CoAP requests and responses. When malformed CBOR data is supplied, the parser continues reading beyond allocated buffer boundaries, exposing sensitive memory contents or causing application crashes. Additionally, the vulnerability can lead to heap buffer overflow writes through integer wraparound conditions in allocation size computations, further expanding the potential attack surface.

Root Cause

The root cause is improper input validation where security-critical bounds checking is implemented using assert() macros instead of runtime validation that persists in release builds. When libcoap is compiled with NDEBUG (standard for production releases), all assert() calls become no-ops, effectively removing all bounds checking from the CBOR parsing routines. This leaves the application vulnerable to buffer over-reads and potential heap corruption when processing attacker-controlled input.

Attack Vector

An attacker can exploit this vulnerability remotely over the network by sending specially crafted CoAP requests containing malformed OSCORE options. The attack does not require authentication and can be executed with low complexity. The attacker constructs CoAP messages with malicious CBOR-encoded OSCORE payloads designed to trigger the out-of-bounds read condition during OSCORE negotiation or message processing. This can lead to information disclosure from heap memory, denial of service through application crashes, or potentially more severe memory corruption through the integer wraparound vulnerability in allocation size computation.

The security patch addresses null pointer checks and proper bounds validation in the PDU handling code:

c
       memcpy(entry->pdu, pdu, offsetof(coap_pdu_t, token));
       memcpy(entry->pdu->token, pdu->token, pdu->used_size);
       /* And adjust all the pointers etc. */
-      entry->pdu->data = entry->pdu->token + (pdu->data - pdu->token);
+      if (pdu->data)
+        entry->pdu->data = entry->pdu->token + (pdu->data - pdu->token);
     }
   }
   entry->cache_key = coap_cache_derive_key(session, pdu, session_based);

Source: GitHub Commit for libcoap

Additionally, the PDU resize function was updated with improved bounds checking:

c
 int
 coap_pdu_resize(coap_pdu_t *pdu, size_t new_size) {
   if (new_size > pdu->alloc_size) {
+    /* Expanding the PDU usage */
 #if !defined(WITH_LWIP)
     uint8_t *new_hdr;
     size_t offset;
 #endif
+
     if (pdu->max_size && new_size > pdu->max_size) {
       coap_log_warn("coap_pdu_resize: pdu too big\n");
       return 0;

Source: GitHub Commit for libcoap

Detection Methods for CVE-2026-29013

Indicators of Compromise

  • Unexpected application crashes in libcoap-based services with stack traces pointing to oscore_cbor.c or CBOR parsing functions
  • Memory corruption errors or segmentation faults during CoAP message processing
  • Anomalous CoAP traffic patterns with malformed OSCORE option headers targeting IoT gateways or constrained devices
  • Increased memory read errors or address sanitizer violations in development/testing environments

Detection Strategies

  • Deploy network intrusion detection rules to identify malformed CoAP packets with suspicious OSCORE option structures
  • Monitor CoAP endpoints for abnormally large or malformed CBOR payloads in OSCORE negotiation messages
  • Implement application-level logging to capture OSCORE processing failures and CBOR parsing errors
  • Use memory safety tools (AddressSanitizer, Valgrind) in testing environments to identify out-of-bounds access attempts

Monitoring Recommendations

  • Enable verbose logging on CoAP gateways and servers to capture detailed information about OSCORE option processing
  • Set up alerts for repeated CoAP message processing failures from single source addresses
  • Monitor system resource utilization for signs of exploitation attempts causing memory exhaustion or crashes
  • Implement packet capture on CoAP endpoints for forensic analysis capability

How to Mitigate CVE-2026-29013

Immediate Actions Required

  • Update libcoap to the latest patched version containing commit b7847c4dbb0dbee7c90b09a673d4cae256f03718
  • If immediate patching is not possible, consider temporarily disabling OSCORE functionality if not required for operations
  • Implement network-level filtering to restrict CoAP access to trusted sources only
  • Review and audit all applications built with libcoap for proper error handling around CBOR parsing

Patch Information

The vulnerability has been addressed in the libcoap GitHub commit. This patch adds proper null pointer validation and improves bounds checking in PDU handling routines. Organizations should update to a libcoap version that includes this security fix.

Workarounds

  • Restrict network access to CoAP services using firewall rules to limit exposure to trusted networks only
  • Consider compiling libcoap without NDEBUG in security-sensitive deployments to retain assert-based checks (note: this impacts performance)
  • Implement application-level input validation before passing data to libcoap OSCORE processing functions
  • Deploy a reverse proxy or CoAP gateway that performs protocol validation before forwarding to backend libcoap services
bash
# Example firewall rules to restrict CoAP access
# Allow CoAP (UDP 5683) only from trusted network
iptables -A INPUT -p udp --dport 5683 -s 192.168.1.0/24 -j ACCEPT
iptables -A INPUT -p udp --dport 5683 -j DROP

# Allow CoAP over DTLS (UDP 5684) only from trusted network
iptables -A INPUT -p udp --dport 5684 -s 192.168.1.0/24 -j ACCEPT
iptables -A INPUT -p udp --dport 5684 -j DROP

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechLibcoap

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability0.05%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/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-125
  • Technical References
  • GitHub Commit for libcoap
  • Latest CVEs
  • CVE-2026-9813: FlowIntel SSRF Vulnerability

  • CVE-2026-4377: D-Link DWR-X1820 Auth Bypass Vulnerability

  • CVE-2026-47074: ex_aws_sns Auth Bypass Vulnerability

  • CVE-2026-46241: Linux Kernel Use-After-Free Vulnerability
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