Junglewise Threat Intelligence

CVE-2026-29013: libcoap out-of-bounds read in OSCORE CBOR unwrap handling

CVE-2026-29013 · Severity: critical · CVSS 9.8 · Published 2026-04-17

Executive brief

libcoap is a popular library used to implement the Constrained Application Protocol (CoAP) for Internet of Things (IoT) devices. A vulnerability in how it handles secure communication (OSCORE) could allow an attacker to crash a device or potentially access sensitive information by sending specially crafted network requests. This could lead to service outages or data exposure in environments using IoT sensors and controllers.

Technical details

libcoap is vulnerable to an out-of-bounds read in its OSCORE implementation, specifically within the CBOR unwrap handling in 'src/oscore/oscore_cbor.c'. The 'get_byte_inc()' function relies on 'assert()' for bounds checking; however, these assertions are stripped in production builds compiled with NDEBUG. A remote, unauthenticated attacker can exploit this by sending crafted CoAP requests with malformed OSCORE options or responses during negotiation. This can trigger out-of-bounds reads during CBOR parsing or cause integer wraparound during allocation size computation, potentially leading to memory corruption or information disclosure. A patch is available in the project's repository.

Affected products

  • obgm libcoap up to (excluding) 4.3.5b

Timeline

  • 2026-04-17: disclosed
  • 2026-04-17: advisory
  • 2026-06-02: other: NIST initial analysis completed

References

Related threats