CVE-2025-50518
A use-after-free vulnerability exists in the coap_delete_pdu_lkd function within coap_pdu.c of the libcoap library. This issue occurs due to improper handling of memory after the freeing of a PDU object, leading to potential memory corruption or the possibility of executing arbitrary code. NOTE: this is disputed by the Supplier because it only occurs when an application uses libcoap incorrectly.
What to do
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | libcoap3 | Fix pending | UBUNTU-CVE-2025-50518 | |
| Ubuntu 26.04 | libcoap3 | Will not fix Not a valid vulnerability, issue closed | UBUNTU-CVE-2025-50518 | |
| Ubuntu 25.10 | libcoap3 | Will not fix Not a valid vulnerability, issue closed | UBUNTU-CVE-2025-50518 | |
| Ubuntu 24.04 | libcoap3 | Will not fix Not a valid vulnerability, issue closed | UBUNTU-CVE-2025-50518 | |
| Ubuntu 22.04 | libcoap2 | Will not fix Not a valid vulnerability, issue closed | UBUNTU-CVE-2025-50518 | |
| Ubuntu 22.04 | libcoap3 | Will not fix Not a valid vulnerability, issue closed | UBUNTU-CVE-2025-50518 | |
| Ubuntu 20.04 | libcoap2 | Fix pending | UBUNTU-CVE-2025-50518 | |
| Ubuntu 18.04 | libcoap | Fix pending | UBUNTU-CVE-2025-50518 |
References
- https://github.com/IreneTheITCrowd/blog/blob/main/libcoap-vulnerability.md
- https://github.com/IreneTheITCrowd/blog/issues/1
- https://github.com/obgm/libcoap/issues/1724#issuecomment-3199631257
- https://github.com/obgm/libcoap/issues/1724#issuecomment-3234613482
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.