CVE-2025-50518: libcoap · Use-after-free Vulnerability Exists
Affects libcoapSource GCVE Database
Not known to be exploited · CVSS 9.8 Critical.
Data as of 19 Nov 2026, 16:27 UTC
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 14 Aug 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: 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 18 Nov 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 26.10libcoap3pkg:deb/ubuntu/libcoap3?arch=source&distro=stonkingOther threats | Affected
| Fixed in– |
Ubuntu 26.04 LTSlibcoap3pkg:deb/ubuntu/libcoap3?arch=source&distro=resoluteOther threats | Affected
| Fixed in– |
Ubuntu 25.10libcoap3pkg:deb/ubuntu/libcoap3?arch=source&distro=questingOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSlibcoap3pkg:deb/ubuntu/libcoap3?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 22.04 LTSlibcoap2pkg:deb/ubuntu/libcoap2?arch=source&distro=jammyOther threats | Affected
| Fixed in– |
Ubuntu 22.04 LTSlibcoap3pkg:deb/ubuntu/libcoap3?arch=source&distro=jammyOther 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
The supplier disputes the vulnerability's applicability, indicating it arises only from incorrect use of libcoap by applications. Users should review application usage of libcoap to ensure correct handling of PDU objects. Monitor vendor advisories for any official fixes or guidance.
Description
A use-after-free vulnerability exists in the coap_delete_pdu_lkd function within the coap_pdu.c file of the libcoap library. This vulnerability arises from improper memory handling after freeing a PDU object, which can lead to memory corruption or potentially allow arbitrary code execution. The supplier disputes the issue, stating it only occurs if the application misuses libcoap. The vulnerability affects multiple specific versions of libcoap and has a critical severity rating with a CVSS score of 9.8.
References
- ubuntu.com/security/CVE-2025-50518 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2025-50518 (opens in a new tab)
- github.com/IreneTheITCrowd/blog/blob/main/libcoap-vulnerability.md (opens in a new tab)
- github.com/obgm/libcoap.git (opens in a new tab)
- github.com/obgm/libcoap/issues/1724 (opens in a new tab)