Executive brief
ccoap is a Constrained Application Protocol (CoAP) library used in IoT and embedded systems to handle network messaging. A null pointer dereference vulnerability in the message debugging function can cause the application to crash when processing specially crafted CoAP messages, leading to denial of service of connected devices or services relying on this library.
Technical details
The vulnerability is a null pointer dereference in the coap_dump_msg() function in lib/ccoap/coap.c. The root cause occurs when processing CoAP messages with options of zero length: the coap_decode_option() function calls malloc(0), which may return NULL on some systems. The coap_dump_msg() function later attempts to call memcpy() on this NULL pointer without validating it first, resulting in a segmentation fault. The vulnerability requires the attacker to send a crafted CoAP message containing an option with zero length to an application using the affected library. No authentication or special privileges are required; the attack is network-reachable. The impact is denial of service through application crash. A patch must add a NULL pointer check before the memcpy() call in coap_dump_msg().
Affected products
- ipflavors ccoap commit 77f55c4b466e99327c24ace8a2913d3ba7e2ccd5
Timeline
- 2026-08-27: disclosed
- 2026-08-27: advisory: CVE-2026-26457