CVE-2024-46304
High · 7.5CVSS
7.5
EPSS
0.6%
Published
Oct 9, 2024
CISA due date
—
Cloudanix analysis
A bug in a library used for lightweight device communication can let outsiders knock services offline with a single specially made message until the software is updated.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
NULL pointer dereference in coap_handle_request_put_block allows remote unauthenticated attackers to crash the process handling CoAP block-wise transfers.
Why it matters to the business
Applications relying on libcoap for constrained-device communication can experience sudden service outages and require manual restarts, increasing operational overhead until patched.
How an attack unfolds
An attacker sends a crafted CoAP PUT request with block-wise transfer options that reaches the vulnerable function, triggering the NULL dereference and terminating the server process.
How to fix it
Upgrade libcoap to a version newer than 4.3.5-rc2 that contains the NULL-pointer fix; recompile and redeploy all dependent services; validate the update with regression tests for block-wise transfers.
How to confirm the fix worked
Confirm the running libcoap version is greater than 4.3.5-rc2; attempt a controlled block-wise PUT request in a test environment and verify the process no longer crashes.
Typical attack path
- Identify publicly reachable CoAP endpoints using libcoap
- Craft a PUT request containing block options that forces the NULL path
- Transmit the request to trigger the dereference and crash
- Repeat to maintain denial of service
How to detect it
Monitor process crash logs for segmentation faults originating from coap_block.c or the coap_handle_request_put_block symbol; correlate with incoming CoAP PUT traffic containing block options from unexpected sources.
- coap_handle_request_put_block
- src/coap_block.c
- segmentation fault.*coap
What your security team should do
- Prioritize upgrade of all libcoap instances within the next maintenance window
- Add CoAP endpoint reachability and version checks to asset inventory
- Enable process monitoring and automatic restart for CoAP services until patched
- Review network ACLs to restrict untrusted CoAP traffic where feasible
The record
A NULL pointer dereference in libcoap v4.3.5-rc2 and below allows a remote attacker to cause a denial of service via the coap_handle_request_put_block function in src/coap_block.c.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | libcoap2 | 0 | No fix |
| Debian:12 | libcoap3 | 0 | No fix |
| Debian:13 | libcoap3 | 0 | No fix |
| Debian:14 | libcoap3 | 0 | 4.3.5-1 |
| Ubuntu:18.04:LTS | libcoap | 0 | No fix |
| Ubuntu:20.04:LTS | libcoap2 | 0 | No fix |
| Ubuntu:22.04:LTS | libcoap2 | 0 | No fix |
| Ubuntu:22.04:LTS | libcoap3 | 0 | No fix |
| Ubuntu:24.04:LTS | libcoap3 | 0 | No fix |
| Ubuntu:24.10 | libcoap3 | 0 | No fix |
| Ubuntu:25.04 | libcoap3 | 0 | No fix |
| Ubuntu:25.10 | libcoap3 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | libcoap | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | libcoap2 | 0 | No fix |
Related vulnerabilities
- CVE-2023-51847 An issue in obgm and Libcoap v.a3ed466 allows a remote attacker to cause a denial of… Also affects libcoap2
- CVE-2024-31031 An issue in `coap_pdu.c` in libcoap 4.3.4 allows attackers to cause undefined behavior… Also affects libcoap3
- CVE-2023-30362 Buffer Overflow vulnerability in coap_send function in libcoap library 4.3.1-103-g52cfd56… Also affects libcoap3
- CVE-2026-112108 A vulnerability was determined in ztxz16 fastllm up to 0.1.8.2. CWE-120
- CVE-2026-90804 A vulnerability was detected in GNU Binutils 2.47. CWE-120
- CVE-2026-90803 A security vulnerability has been detected in GNU Binutils 2.47. CWE-120
- CVE-2026-90801 A security flaw has been discovered in GNU Binutils 2.47. CWE-120
- CVE-2026-42808 An issue was discovered in Bosch Sensortec COINES_SDK versions 2.0 through 2.11. The host… CWE-120