CVE-2024-31031: libcoap · Integer Overflow or Wraparound
Affects libcoapSource CVE Database V5
Not known to be exploited · CVSS 7.5 High.
Data as of 26 Oct 2026, 13:47 UTC
- EPSS
- 0.8% chance of exploitation in 30 days – higher than 58% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HExploitation evidence
Disclosed: evidence found.
CVE published 17 Apr 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
GitHubobgm/libcoappkg:github/obgm/libcoapOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
- Monitor vendor communications and security advisories for official patches or updates addressing CVE-2024-31031 and apply them promptly once available.
- Implement network-level filtering to restrict access to CoAP services only to trusted sources, reducing exposure to unauthenticated remote attacks.
- Employ anomaly detection systems to identify unusual CoAP message sequences that could indicate exploitation attempts.
- Where feasible, apply strict input validation and sanity checks on CoAP message sizes and sequences within custom implementations or wrappers around libcoap.
- Segment IoT and constrained device networks from critical infrastructure to limit the blast radius of potential denial of service attacks.
- Conduct regular security assessments and penetration tests focusing on IoT communication protocols to identify similar weaknesses.
- Maintain up-to-date inventories of devices and software versions using libcoap to prioritize remediation efforts effectively.
Description
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.
References
- github.com/obgm/libcoap/issues/1351 (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LPENEJBV3KSASIYKNZAKXDAH7Q66KPYG/ (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TUL7QDYFGEIJVO2ZSG4O5HEAWR6PFC52/ (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TUL7QDYFGEIJVO2ZSG4O5HEAWR6PFC52/ (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LPENEJBV3KSASIYKNZAKXDAH7Q66KPYG/ (opens in a new tab)