Vulnerability · Published Aug 14, 2025 · Assigned by mitre

CVE-2025-50518

Critical 9.8

In plain English

A critical-severity use-after-free in the libcoap2 package (Ubuntu). Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 42% of all known vulnerabilities).

Severity (CVSS 3.1)9.8Critical
Exploit odds (30 days)0.5%top 57.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Ubuntu:22.04:LTSlibcoap2no fix listedUBUNTU-CVE-2025-50518
Ubuntu:22.04:LTSlibcoap3no fix listedUBUNTU-CVE-2025-50518
Ubuntu:24.04:LTSlibcoap3no fix listedUBUNTU-CVE-2025-50518
Ubuntu:25.10libcoap3no fix listedUBUNTU-CVE-2025-50518
Ubuntu:26.04:LTSlibcoap3no fix listedUBUNTU-CVE-2025-50518
Ubuntu:26.10libcoap3no fix listedUBUNTU-CVE-2025-50518

Affected products (as reported)

VendorProductVersions
n/a n/a n/a

Weakness: CWE-416 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

References