Code execution via unchecked CoAP option read
Published Oct 22, 2024 · Updated Oct 23, 2024
Stack buffer overflow in FreeCoAP 0.7 allows remote attackers to execute arbitrary code or crash a server via a crafted CoAP packet. In coap_msg_parse_ops, the option loop reads p[0] before checking whether len is zero, so a packet that exhausts the receive buffer triggers a one-byte out-of-bounds stack read. No authentication or user interaction is required; reachable CoAP server and proxy processes are exposed to code execution or a crash.
Summary
What happened
Stack buffer overflow in FreeCoAP 0.7 allows remote attackers to execute arbitrary code or crash a server via a crafted CoAP packet. In coap_msg_parse_ops, the option loop reads p[0] before checking whether len is zero, so a packet that exhausts the receive buffer triggers a one-byte out-of-bounds stack read. No authentication or user interaction is required; reachable CoAP server and proxy processes are exposed to code execution or a crash.
The record
- CVE
- CVE-2024-40494
- Published
- Oct 22, 2024
- Updated
- Oct 23, 2024
- Vendor
- Keith Cullen
- Product
- FreeCoAP
- Classifications
- CWE-120, T1190
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Oct 22, 2024CVE publishedPublication date reported by the CVE source.
- Oct 23, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0.7
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- FreeCoAP coap_msg_parse_ops crafted-packet proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo