CVE-2025-50518 Use after free in n/a

Critical 9.8 Published Updated

A use-after-free in libcoap allows arbitrary code execution if the library is used incorrectly by the application.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-50518?

CVE-2025-50518 is a critical use after free vulnerability in n/a, published on 14 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

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.

Weakness: CWE-416

Which versions are affected by CVE-2025-50518?

How do I fix CVE-2025-50518?

No fix has been published for CVE-2025-50518 yet. Limit exposure of the affected software until one is available.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2025-50518 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-50518 exists.

Sources

Also known as GHSA-fc59-q736-3r9p, UBUNTU-CVE-2025-50518.

Is CVE-2025-50518 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free