Logo
componentlibcoap
Name
libcoap
Version
4.3.4
Type
library
Description
A C implementation of the Constrained Application Protocol
Licenses
BSD-2-Clause & BSD-3-Clause
PURL
-
CPE
cpe:2.3:*:libcoap:libcoap:4.3.4:*:*:*:*:*:*:*

Other Versions#


Project
Branch
Version
master
4.3.5b

Patches#


#
Title
Author
Resolve
1
coap_oscore.c: Fix parsing OSCORE configuration information
Jon Shallow <supjps-libcoap@jpshallow.com>
CVE-2024-0962
2
coap_pdu.c: Fix UndefinedBehaviorSanitizer:
Jon Shallow <supjps-libcoap@jpshallow.com>
CVE-2024-31031
3
coap_address.c: Validate length of provided host name
Jon Shallow <supjps-libcoap@jpshallow.com>
CVE-2025-34468
4
OSCORE: Fix OSCORE configuration file parsing issue
Jon Shallow <supjps-libcoap@jpshallow.com>
CVE-2025-59391

Vulnerabilities#


Name
Analysis
Description
Exploitable
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 out-of-bounds reads through integer wraparound in allocation size computation.
Patched
A memory disclosure vulnerability exists in libcoap's OSCORE configuration parser in libcoap before release-4.3.5-patches. An out-of-bounds read may occur when parsing certain configuration values, allowing an attacker to infer or read memory beyond string boundaries in the .rodata section. This could potentially lead to information disclosure or denial of service.
Patched
libcoap versions up to and including 4.3.5, prior to commit 30db3ea, contain a stack-based buffer overflow in address resolution when attacker-controlled hostname data is copied into a fixed 256-byte stack buffer without proper bounds checking. A remote attacker can trigger a crash and potentially achieve remote code execution depending on compiler options and runtime memory protections. Exploitation requires the proxy logic to be enabled (i.e., the proxy request handling code path in an application using libcoap).
Patched
An issue in `coap_pdu.c` in libcoap 4.3.4 allows attackers to cause undefined behavior via a sequence of messages leading to unsigned integer overflow.
Patched
A vulnerability was found in obgm libcoap 4.3.4. It has been rated as critical. Affected by this issue is the function get_split_entry of the file src/coap_oscore.c of the component Configuration File Handler. The manipulation leads to stack-based buffer overflow. The attack may be launched remotely. The exploit has been disclosed to the public and may be used. It is recommended to apply a patch to fix this issue. VDB-252206 is the identifier assigned to this vulnerability.
False Positive
An issue in obgm and Libcoap v.a3ed466 allows a remote attacker to cause a denial of service via thecoap_context_t function in the src/coap_threadsafe.c:297:3 component.