CVE-2025-50518
A use-after-free vulnerability exists in the coap_delete_pdu_lkd function within coap_pdu.c of...
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
9.8
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.
- Record
CVE-2025-50518- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-416
- Updated
- 2026-11-02
EUVDEUVD-2025-24861
9.8
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.
- Record
EUVD-2025-24861- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-fc59-q736-3r9p
9.8
A use-after-free vulnerability exists in the coap_delete_pdu_lkd function within coap_pdu.c of...
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.
- Record
GHSA-fc59-q736-3r9p- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-416
- Updated
- 2026-11-02
NVD
9.8
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.
- Record
CVE-2025-50518- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-416
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2025-50518
9.8
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.
- Record
UBUNTU-CVE-2025-50518- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Affected packages
| Package | Affected | Fixed |
|---|---|---|
libcoapUbuntu:18.04:LTS |
All versions, plus listed versions 4.1.2-1 |
None known |
libcoap2Ubuntu:20.04:LTS |
All versions, plus listed versions 4.2.0-24.2.1-1 |
None known |
libcoap2Ubuntu:22.04:LTS |
All versions, plus listed versions 4.2.1-14.2.1-1build1 |
None known |
libcoap3Ubuntu:22.04:LTS |
All versions, plus listed versions 4.3.0-24.3.0-2build1 |
None known |
libcoap3Ubuntu:24.04:LTS |
All versions, plus listed versions 4.3.1-24.3.3-14.3.4-14.3.4-1.1build24.3.4-1.1build34.3.4-1.1build4 |
None known |
libcoap3Ubuntu:25.10 |
All versions, plus listed versions 4.3.4-1.1build4 |
None known |
libcoap3Ubuntu:26.10 |
All versions, plus listed versions 4.3.5-24.3.5-34.3.5-44.3.5-4ubuntu1 |
None known |
libcoap3Ubuntu:26.04:LTS |
All versions, plus listed versions 4.3.4-1.1build44.3.5-14.3.5-2 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-50518 is a critical vulnerability (CVSS 9.8) in libcoap, published August 14, 2025. Its validity is disputed. EPSS puts the chance of exploitation in the next 30 days at 0.49%, the 42nd percentile.
References
github.com/IreneTheITCrowd/blog/blob/main/libcoap-vulnerability.md
github.com/IreneTheITCrowd/blog/issues/1
github.com/obgm/libcoap/issues/1724
nvd.nist.gov/vuln/detail/CVE-2025-50518
github.com/obgm/libcoap.git
github.com/advisories/GHSA-fc59-q736-3r9p
ubuntu.com/security/CVE-2025-50518
cve.org/CVERecord?id=CVE-2025-50518